Even the rear axle, or ring and pinion, would have to be changed- diesel and gas engines operate in different RPM ranges.
You need to consider because of the difference in size and shape diesels could even use different sheet metal.
Unless you have an extremely good understanding of both gas and diesel operation AND vehicle assembly a 2 year old motor home isn't the vehicle to begin the learning process.
You have a relatively new functioning motor home. Use the money and time it would take for the engine swap to travel, it will be more memorable, in a good way.