It would be best to have an electrician or qualified handy person who knows what they are doing to convert it to a proper RV outlet. If you need a 30 Amp RV outlet they would change the breaker from a 40 amp 240 V range type to a 30 amp 110 V type and re-use the existing cable from the panel to the outlet (cable would be slightly over-sized but that's OK).
If you need a 50 Amp RV outlet then they would keep the same 40 amp 240 V breaker and replace the outlet. It would only be able to provide two 40 Amp feeds to the 50 amp shore cable but that's OK IMO there is no Heartland model that needs more than 40 amp x 2 anyway, even in the summer with all the ACs running. It's only the big motor home "rock star RVs" that need 50 amps x 2.
The only issue for the 50A outlet scenario would be if its a older standard range outlet it has no ground wire to the panel only L1, L2, and Neutral. In some jurisdictions it would be against building code to derive the ground at the RV outlet from the neutral wire, and the Electrician would not be able to re-use the existing wire from the range outlet to the panel.