The head will fit, the issue is the alignment of the intake to the head. I know that an HO head will fit with little problem onto an 87, but honestly I'm not sure how different a 98 head is from the 91 to 96 heads, or if there is a difference.
The 99 WJ and 2000 XJ are similar in that we both have distributor-less ignitions, don't know if the intakes are the same. None of the 2000 and 2001 XJ's we drove seemed to scoot like our 99 WJ with the 4.0.
Fred