FMJ hit it on the head. Diesels are expected to go 5-10,000 hours before needing a rebuild. Expected, that's different from capable.
However, some folks can break an anvil hitting it with a feather. Just imagine what they may do with a tractor!
You want to check the basic stuff. Compression (needs a special rig for a diesel), oil quality, hydro fluid quality, leaks, paint, tires, front end looseness, grease zerks (should have grease on them - even the hard to reach ones!!!), etc. Dirt in the air is what wears out engines, check the post air cleaner tube for dirt. If you find any, you may want to walk away. Unlike cars, there is no law regulating the hour meter. That is a cheat can change it, turn it back what ever. 99% are perfectly accurate, but keep it in mind. Most hour meters are under 50 bucks and can be swapped in 15 min.
Typically small diesels that PTO at 3000-ish rpms will start to tire at 3000 hours. Larger ones that PTO at 2000-ish rpms will go 5000 hours before they start to tire out. Larger diesels are closer to 7000 hrs. That's where they are typically traded off as the repair costs are over whelming the value.
jb