I came across this thread while researching my P0340 code and cam sensor issue. I recently inherited this 2005 TJ 4.0 42RLE and it has been running perfect aside from a bunch of oil leaks. I went to move it after the storm that rolled through Houston a couple weeks ago and it popped the CEL and took a long time to crank and start. I figured it was just due to it sitting for a few weeks and the battery being a little low, but when I reset the code it came right back...
I picked up a cam sensor from O'reilly's which was a standard motor products brand, which was mentioned as making the NAPA sensor recommended in this thread. After I installed it, it seemed to work fine, but then after a short drive, the engine stumbled and the cel popped back on again, and the engine went back into limp mode.
In doing more research on the issue, I found this thread and a few other topics regarding the OPDA and the 05-06 cam position sensor issues, and that there aren't any decent aftermarket replacements available. I also saw a few comments about the waveform of the aftermarket sensors, and the distance from the reluctor wheel where the sensor sits in the drive assembly. I pulled the cover off the OPDA and compared how far the previous sensor was sitting (not sure if it is oem or aftermarket, the wire loom was not crispy and falling off like the original so I would guess its been replaced at some point) compared to this new one. The new one had a noticeably thicker bushing on the hold down ear and it seemed like that was keeping it from seating all the way in the housing. I found that if I rotated the sensor to where the mounting ear moved off the standoff, the sensor dropped further into the OPDA and sat much closer to the reluctor wheel.
I figured Oreilly's isn't taking this sensor back anyways, and if it doesn't work i'll buy the NAPA one, so I took a flat file and filed down the brass bushing on the mounting ear to be basically flush with the plastic ear. This allowed the sensor to mount flush against the shoulder on the sensor, and sat a few mm closer to the reluctor wheel than the previous sensor. I drove it around for an hour or so in the heat of the day on saturday and the code hasn't come back, and then again on sunday again with no issues.
I realize that the OP in this post had issues when the weather was cold, but mine originally popped up when the weather was neither hot or cold. I also don't suspect the OPDA or timing chain to be the issue since I only got P0340 and not the P0344 or other codes. The jeep also only has 72,000 miles on it currently.
Just thought I'd resurrect the thread to the state of things as of 2024, hopefully this post is helpful for someone else dealing with similar issues.