Won't work, without a lot of work.
A 98 and later XJ AW4 has both an input and an output speed sensor, a 97 or earlier only has an output speed sensor and it's different. You can swap the output speed sensor over but you still won't have an input speed sensor.
You *might* be able to get away with it if you get a 97 TCU (and leave the original 87 output speed sensor on the transmission when you install it) but I have not tested this yet so don't try it unless you like being a guinea pig.
If you can find an AW4, NP231, and rear driveshaft (since 2wd vs 4wd rear driveshafts are different lengths) from a 98 or later it is bolt-in. Then you are only a dana 30, shift linkage/handle, and front driveshaft from having 4x4, also.