I'll add some input since you are asking.
I currently own a 2001 Dodge Quad Cab with the 5.9. The engine is great and super dependable. I have owned it since 135k and I am approaching 200k. On the 5.9s, the weak links are the auto transmission and the fuel pumps. If you purchase one from 98-02, plan on spending ~$600 for an aftermarket lift pump to supply reliable fuel to the injection pump. If you do that and keep the power stock, the transmission will be good and the injection pump will be good. If you want to add some power, plan on upgrading the transmission. New injectors are cheap (~$350 for a full set of 6 versus $350 each on newer diesels). Engine maintenance is generally pretty easy to do (lots of room to work) and the engines are reliable with no emissions crap. That said, the back seats in the 98-02s are tiny, since they don't have four full doors. I get 19-21 mpg with mine easy. I also just installed a Smarty S-03 tuner which makes the truck drive so much better, adds some horsepower, and my mileage bumped up to 21.5 mpg on my first tank since installation. Also, these trucks are getting old, expect to repair other systems -- I have replaced brakes, had axles rebuilt, etc. That comes with any truck that is 15 years old.
If you want a 3rd gen Dodge (03-07), you can get a bigger back seat and possibly a Mega Cab. However, the engines are still the 5.9 but they have a different fuel system (common rail injection) that is more complicated and more costly to repair. Injector sets are about $1500-1800 for a set of 6. The fuel pumps are more reliable stock, especially with stock power. The transmissions are better, but still need upgrades if power is upgraded. There are also a few other upgrades, bigger brakes which is better for towing, better interior, etc. Still no emissions crap so mileage is good and the engines are relatively simple. Axles and many other parts are similar to the 2nd generation models (98-02).
The 6.7 CTD starting adding emissions equipment. Tons of power, smooth driving, quiet, but don't expect to get over 16 mpg stock. Also, much more costly to maintain/repair and things get much more complicated for the home mechanic. I have ridden in quite a few and have friends with them. They are a different beast and it really depends on what you want out of your truck. If you want a quiet diesel truck that rides and feels like a car or SUV, you will like it. But this comes at a huge cost.
Onto the Fords. I have a friend with a 6.0 in an E-350 van and it was bullet proofed. From everything I have read you better plan on deleting the entire EGR system from the 6.0 and getting a tuner so that doesn't set off the CEL or throw codes. If it is deleted, engines seem great. Good power, drivability, mpg, but that upfront cost can be huge. However, he has now started having problems with the alternator and electrical system.
Overall, I will echo what others have said. New diesels are very complicated and have hug repair bills. If you live somewhere and have the money to delete the emissions systems, that seems to help on many fronts. If it were me, I would look for a totalled 3rd gen Dodge that had the transmission blow up. Buy it, upgrade the tranny, and you are golden. The truck I purchased had a salvaged title as the original owner got stuck in water and let it sit and the transmission got water in it. He wrote it off and the guy I bought it from purchased it for salvage, had the tranny rebuilt and upgraded, and then was on his way. I got a great deal on it and the transmission was already taken care of. I upgraded the fueling system and everything is good! The other alternative is look for a 6.0 that has already been bullet proofed.
Good luck!