Okay, use this link into the ESM, all the stuff you need is on pages EC-1250 and -1251:
https://www.nicoclub.com/service-manual ... 9%2FEC.pdf
The HO2S is connector F31, it has 4 wires but you're only interested in two. The blue wire on pin 1 is the HO2S signal (data), the pink wire on pin 4 is sensor ground. The 12V supply is only for the heater and that would be throwing a different code, so the other 2 wires are irrelevant. When looking at the connector drawings, they're all shown from the harness side (where the wires enter), so you need to mirror them when checking pin-fits on the terminal side. One word of caution when using a safety pin as a spread-terminal gauge, get out your caliper and measure it. Under no circumstances use a pin thicker than 0.028", you can spread the spring and permanently damage it. The ECM connector is F8, which is the largest of the three ECM connectors. Notice that pins 73~80 are larger than the rest, you can use that to orient the connector correctly for checking. Pin 33 is the blue signal wire, pin 35 is the ground wire. From the way the circuit is behaving, I suspect the problem is in the ground connection. If you don't find any pin-fit issues, try sticking a safety pin or T-pin into the back of the sensor connector on the sensor side, then jumper it temporarily to a chassis ground. If the sensor starts to behave itself, it's perfectly acceptable to make the jumper permanent, just scotchlok an auxiliary ground onto the sensor wire. Don't try to splice it, butt crimps are a bad idea underneath the car and the wires on the sensor side are steel and won't take solder. Scotchlok it and then seal the scotchlok with RTV. If the problem is in the signal wire, I suggest removing the backshell from the ECM connector and run a new parallel wire all the way from the ECM to the car side of the sensor connector. That run will be copper, so solder-shrinks will be the right splice type. Look up this thread for how to get the backshell off the ECM connector:
post6828764.html