So I just had to replace my crankshaft position sensor after the truck suddenly stalled and threw a P0335 code at me.
The sensor was pretty cheap at $36 from the local Nissan dealer. Anyway on to the walkthrough......
1. Remove passenger side front wheel.
2. Remove inner wheel well cover. You could probably manage without this step but it does make it much easier.
3. Locate the sensor. It is covered by a rubber boot.
4. Pull the boot back to reveal the sensor. The bolt is a 10mm bolt. TIP!! Remove the connector before undoing the bolt.
5. It's a bit tricky getting the ratchet on because of the trans dipstick tube and a brake line but it's not too bad.
6. Remove sensor.
7. Replace sensor, replace bolt, re-connect wiring, replace inner wheel well cover, put wheel back on. Job Done!!
Old and new sensor side by side.
Hope this helps someone