Nissan Xterra 2001 V6 3.3L Knock Sensor replacement
Knock Sensor Replacement instructions
On p.EC-936 in the Contents > Engine Control System section of the manual it shows the location of the knock sensor for your engine type and how to test it but it doesn’t detail how to replace it. I have looked in the other “engine” sections of the manual but the knock sensor is only mentioned in the Engine Control System section, but I may have missed it.
Hopefully this is of some help anyway.