The 4.0s have three common issues.
1. Oil sludge: Look down the oil filler and see what the engine looks like internally with a small flashlight. A light gold of brown coating on the non-moving metal and plastic parts is okay. A dark brown coating of ANY deposits whatsoever means move on to a different car.
2. Timing chain component failures: This will almost always be on of the plastic timing chain guides, and is most easily identified by a rattle on start-up that may or may not get worse when the engine warms up and/or is revved up. In particular, listen closely to the passenger side rear of the engine, as that timing chain is usually the one that has a guide fail first. The front chains, tensioners and guides can be replaced with the engine in the car. The rear chain and its components require engine removal to access.
3. Coolant leaks: I've seen 4.0s with coolant leaking from head gaskets around the 100k mark, but that's relatively rare. What is far more common is a leak from a cracked thermostat housing.
If any of those issues except the thermostat housing are present, I'd walk away. All of that said, the 4.0 is a neat engine that sounds good and makes respectable power for its size and technology while getting decent fuel economy. The problem is, they're frequently given to younger drivers that don't maintain them, leading to the three issues above.