a full rebuild is $10-15k easy on a 6.4 and can go up from there if you want to add any performance goodies
when I buy a 6.4, I either buy one that needs an engine for $15k+ below retail
OR
I buy one from the original owner that's been meticulously maintained so that I don't have to touch the engine...
buying a high mile truck from somebody who has only owned it for 35k miles and is unloading it after pumping a bunch of money into mods sets off more red flags than I can count... and I don't buy 6.4's that have ONE red flag!
I absolutely love 6.4's. When you get a good one, they're awesome. They're easy 300k+ mile engines when they're maintained correctly and not abused.
The problem is that idling them and/or extending oil drain intervals is abuse, and a lot of folks didn't/don't realize that. Tuning them and beating the tar out of them is abuse... if you blow a head gasket on a 6.4, you're abusing it... if you over-torque a set of head studs and crack the block, you're abusing it.
There are so many things that can go wrong with a 6.4 that will really eat your lunch. You have to execute a lot of diligence when shopping/buying one.
a 6.0 requires a lot, but you can "redo" the engine for less than half what it costs you on a 6.4, so it's less critical.
6.7 trucks are expensive, but the engines are tough as nails, and if you do have a major problem, the engines are cheap as dirt to replace
HTH