I tried replacing mine from below. Unbolted it from the block but could not replace it.
Nissan replaced it by doing the following.
Removing / fitting Det sensor
From the top,remove intercooler if top mounted and rear hose
remove the large dump valve pipe that goes to the inlet manifold
undo the 12mm bolt that holds the y shaped manifold support bracket on,on the passenger side of the inlet manifold just below where the rear intercooler pipe goes on.
On the back on the y shaped bracket near the top passenger side the vacuum pipes that come from the back on the manifold should be secured by a cablie tie type thing if they are you will need to release them from it
Jack car up and put on axle stands
Remove exhaust downpipe and oil filter
place rubber glove,food bag or something over where the oil filter goes on to stop any oil dripping on your face
Remove the switch multiplug from its mount on the drives side of the y shaped bracket
Remove the 12mm bolt that holds the Y bracket to the drivers side of the inlet manifold underneath best to use a couple of long extensions and a wiggley end for this
remove the 2 9/16 or 14mm bolts from the base of the Y bracket
the bracket should now be free(ish)the loom that goes behind it may be clipped into it about 1/4 way up it and will require unclipping so as not to stretch the loom
move the Y bracket as far as you can to the passenger side
look up towards the centre of the block just below the large water pipe that runs across the back of the engine and you'll see the det sensor held on by a 12mm bolt through the centre of it don't even bother trying to remove the plug from it
Undo the 12mm bolt using the long extensions and wiggley end again with the sensor removed from block its now much easier to remove the plug
Fit new sensor to the plug make sure block is clean where sensor bolts on and refit in reverse order.