In my opinion, if you aren't mechanically inclined, have a place to work on it, know the complete history and if it hasn't had a bunch of the "known" issues resolved already. Run, don't walk. This can be a good engine but with neglect it's a nightmare. It's expensive as hell to fix in terms of parts. Just a quick look at all the forums on that engine should reveal just how many issues people have with it. If you do buy it, immediately check the charging system, many are not working properly which leads to low batteries and then a failed FICM.. I'd bet you'll find a reman alternator under the hood, the factory ones suck. There's a green machine high output one you can get which would likely solve that problem. You should immediately also budget a high end scanner to be able to diagnose problems. Get a good engine monitor that can monitor EGT, FICM voltage, ECT, EOT, and a fuel pressure sensor add on would also be a good idea because low pressure blows the injectors.. Count on lots of maintenance cost compared to a gasser, 14 litres of synthetic and the complement of filters add up. Say $150 for oil, $18 oil filter, $50 air filter, $90 for fuel filters ( rail and engine mounted ). That's what you'll need to calculate into the ownership of the truck. Also, check your rear brake baking plates, they're know to rust out and aren't cheap, Dorman brand makes the ONLY cheap alternative to fix those.$500 from the dealer or $80 from Dorman. The auto hubs can also be problematic, so you want to see if they have been serviced. When they fail, it's often a leak in the system which believe it or not will make you A/C doors act up ( they share the vacuum system ).. ahh the fun of mechanical things.
Good luck, don't rush into it. Try to find one where the last guy dumped all his money into it and finally gave up.