Changed my 2.4JTD Crank Sensor a few times in the last 9 years.
Now treat this as a replacement part due to the same issues you are experiencing.
Changed when i do the cam belt service as is quite straight forward after having a alternator replacement!
1) I just drive up onto the ramps, disconnect the Neg -VE pole from the Battery.
2) Located the sensor located behind the crank block, near the starter motor to the flywheel section of.
3) Trace the cable back and carefully disconnect the Crank Sensor Plug/Socket.
4) Remove Crank Sensor by removing the (from memory 4mm alan socket bolt), then slide out of its hole. fit can
5) Compare AR Part numbers as I was once given the wrong sensor from the dealer, these things happen when AR like all others tend to change design specs mid-flight shall we say.
6) Reverse above to refit new Crank Sensor.
7) To test the old sensor (Hall Effect Transmitter type here), connect to ohm meter (once again from memory I had a range of 450 to 600 ohm's. Now immerse in hot water, say about 30 to 40C and see if the Ohm Meter reading drops off scale to infinity? if not add small amounts of boiling water and stir, look at water temperature as you increase until sensor goes open circuit.
Hope this helps, please let us know your back to running your JTD as normal.