96 is a pain in the ass year unfortunately, some of them got the early 95 and earlier wiring and programming, and some of them got the later 97+ parts. 96 was the first year of OBDII on the XJ and is kind of a crapshoot as to whether you got the early or the late model parts depending on when it was built and what they had laying around.
I would say that anything from 92-96 should work fine but because it's a changeover year I can't say for sure. do you have access to alldata or a factory service manual? it's possible you have a shift solenoid failing in the transmission and there are procedures in the manual to test them.