Go back to the JY, & grab the harness. Then you need to remove the existing kick-panel end(s) (the '97 version... and do it CAREFULLY, because there are 2 white/blk wires that are not interchangeable), AND remove your existing ('99 version) harness end and transfer your '99 connectors (kick panel side only) to your '97 wire harness. Unfortunately, the '97 harness is PHYSICALLY incompatible (yet electrically compatible) with your '99 plugs.
Edit: Reading comprehension failure....sorry. E-bay? Any '97-'01 harness is electrically compatible.
-2001 XJ Limited, 4.0L, NP231 w/ SYE, AW4, 4.5" Lift, 32" tires, 4.56's
-1987 XJ Pioneer, 4.0L, NP231 w/ SYE, NV3550, 4.5" lift, 4.10's, D44 rear