If the rust under the truck isn't too bad, buy it. Base the price paid on the rust level it has, the lifespan of the truck will be limited by that, not the drivetrain.
If it is an AWD, be very very sure that all four tires are the same diameter. If they are not, the AWD transfer case will die sooner than later. They don't last long with mismatched tires, and the cost of an AWD rebuild is high. The parts run almost $500, most rebuilt units you find will be $900ish.
For the WP leak, I'd suggest paying someone to replace the WP, and while there, also replace the timing cover gasket, and the timing chain set. The labor for all of that is about the same for each item, but the parts are only about $125.
Good luck, save that truck.