put the sensor in the exhaust, with no wires connected, and start the car. once the sensor warms up (a few minutes, since it will nto be heated.

then put multimeter on voltage (onyl need to read 1V) and puttign black multi probe to ground, check voltage of the three wires.
the one with voltage will be the signal wire.

nissan swapped colours around over the years.