Its tough when you need a vehicle NOW though and you don't have a lot of scratch to dump into a project.
In that case, the country around here is full of older DRIVABLE diesel trucks, both Fords and Dodges; you can pick up an old beater 2WD automatic diesel for probably less than $800 that is road ready for just close to home.
I would buy a "SPARE" truck that was as close to the truck I intend to keep, especially engine-wise, and just keep it in decent enough shape to get me to the places I need to be, while I am fixing the good truck.
I have done exactly that, which is why there are seven trucks here, FOUR of them have identical 1st Gen. Cummins engines in them, three have the same 5-speed transmission, one headlight size fits every one of them, although three of them are DRW, every one of them shares the same wheel-bolt-pattern, PLUS all the trailers use these same wheels, every single one of them has a DANA rearend, I even have a spare complete ready to go engine on standby, not counting an entire 6.9 IDI engine/transmission that could also be used, etc. etc. you get the idea.
NO, I am not made out of money; I just grab up good bargains WHEN THEY ARE FOR SALE.
Having options keeps me from going into a panic whenever I end up "behind the eight-ball".
Often-times, people find themselves in situations that will force them to make not very well thought out decisions, just so they can go to work to be able to pay for those rash decisions.