I believe the oil pressure sender is a variable resistor, all it take is two wires and a regulated, 5-volt supply for the computer to determine the pressure.
Checking Rock Auto, all 1997 XJ oil pressure sensors are two wire. If there was an additional wire, it would go to ground.
AFAIK, all XJs have two terminal oil pressure sensors.
The sensor, when screwed into the engine block, would be grounded, if wired internally that way.
I was not able to find an internal diagram of how the XJ's oil pressure sensor is wired or constructed.