Depends on the diesel.
I would argue that a Cummins diesel 2006 or older isn't any more expensive to maintain than a gas powered truck of the same era. Oil cost is double, but it goes 2x as far between changes. Oil filters are $20 and fuel filters are about the same ($15 - $20). They both need brakes and tires, belts etc, and the gasser need spark plugs and PCV valve that the diesel (2006 or older Cummins) doesn't.
I will agree that if a diesel breaks down (engine related), it can be very much more to
repair than a comparable gas engine truck, and that the newest crop of diesels might be more expensive to maintain than the older ones, so they might be more than a new gasser -- but I'm not as familiar with them as I've never owned one.
I wouldn't let maintenance costs influence your buying as I think they are pretty close. Resale, initial cost, what you plan to use the truck for, and in what conditions would be better metrics to decide which one to buy IMO.
Prev: 2010 Cougar 322QBS (junk)
02 Dodge 2500 4x4 5.9L CTD 3.55
07 Dodge 3500 4x4 SRW Mega 5.9L CTD 3.73
14 Ram 2500 4x4 Crew 6.4L Hemi 4.10
06 Chevy 1500 4x4 E-Cab 3.73 5.3L
07 Dodge 1500 5.7L Hemi 3.55 / 2010 Jayco 17z
All above are sold, no longer own an RV