Good timing too, I think that's @rythecarguy's most recent Xterra video.Now after wheeling a few weeks ago I’ve got the P0340 code, so I’ll be replacing both sensors soon.
For anyone that’s tackling this here’s a great install video for both c shaft sensors:
Ry the Car Guy - How to Replace Cam Position Sensors
And FWIW, I would recommended subscribing to him on YT. He’s got some good Xterra content on his channel.
What mileage are you at?