The 4.0L engine was not used until 1987. Before 1987 the 6-cylinder engine was a Chevrolet 2.8L V-6. The V-6 was too small for a heavy vehicle like the XJ.
I think any year from 1987 through 2001 is good. In general:
1987 - 1990 ==> non-HO 4.0L
1991 - 1995 ==> First generation HO, OBD-I
1996 - 2001 ==> Second generation HO, OBD-II, new transfer case output (vibration). 2000 and 2001 the front axle is low pinion.