Your $20000 budget is going to limit your choices considerably unless you go high mileage...or take a gamble on a 6.0 Ford...
The Ford 6.0 is an engine to stay away from if you are looking for a truck...now if you already have one, you have taken the big hit and need to do modifications that are well documented to try to make the engine at least tolerable...there are many reasons that these trucks sell for thousands less than the competition...
The 6.4 Ford has a mixed bag of owners with opinions. It is likely better than the 6.0 but comes with it's own expensive common and documented repair possibilities...it is the stoutest built Ford and responds quite well to performance programming...some say it makes more reliable tuned horsepower than any others...
The Dodge diesels have been quite reliable for several years...and the truck quality has improved substantially...early 6.7 had some teething issues but most of these have been resolved...the later models are fine trucks but are well above your budget...
That leaves the GM twins and the DuraMax/Allison combination...research will show that the pre 2006 DuraMax has had some issues. 2005 and earlier models have had injector failure issues that is expensive to repair...but most of these have been replaced by now...there were also some trucks that had overheating issues when pushed hard...the jury is out on how widespread of a problem it is...
Then there is the 2006/early 2007 LLY and LBZ series engines. Although they have different model designations, for all practical purposes a LLY is a detuned LBZ, many of us believe these are the "Gold Standard" for used diesel pickups(for my fan club, please note I wrote "used":B). If one doubts this fact, just look at the "rising" prices for these trucks even as they age. Are they perfect, probably not, but their track record speaks for itself. Solid performance with minimal emission controls, an industry standard Allison transmission and reasonably good fuel mileage. It may be hard to find even a high mileage truck for much less than your budget...It took me 3 months and two lost deals because I thought about it too long before I bought mine...just the market place facts...
Good luck in your search...
Regards