4.0s ar known to last an incredibly long time. One guy on here has 600k miles on his 4.0 and the only major work he has had to do are replace two transmissions (which is to be expected with that mileage). The point being though, he's never had to open the engine to do any internal work. Other than typical maintenance item, the internals have held up to 600k miles.
With higher mileage 4.0s there's only a few things I worry about:
1) The transmission. Figure that most transmissions won't last more than 200k miles without needing a rebuild, or at bare minimum a new clutch (if it's a manual). Automatics tend to go out sooner depending on how they were maintained.
2) The cooling system. I would say the number one cause for most roadside break downs is cooling system failures. Every 120k miles (or 10+ years) or so, it's wise to do a cooling system overhaul, which you can read more about here
Jeep Wrangler TJ Cooling System Overhaul FAQ. It's not that expensive, and it will give your TJ a new lease on life. A new cooling system (assuming you use OE parts) should last 100k plus miles and 10+ years easily.
Other than that though, as long as it was properly maintained and is mostly rust free, I wouldn't worry about it.
It's also worth mentioning that a clean TJ (regardless of mileage) will hold it's value pretty darn well. I paid 20k miles for my 2005 Rubicon with 65k miles. I see them regularly go for anywhere between 20-25k with this sort of mileage in the condition that mine is in. That is only for Rubicon models of course. The non-Rubicon models will go for cheaper.