Also the dist cap and rotor will not cause the P1345 code. The cam sensor and the crank sensor cause this code. The crank sensor is located in the pass side bottom of the timing cover and cam sensor is located below the dist rotor and reluctor ring.
Here are some pics for clarification:
Camshaft Position Sensor installed:
Camshaft Position Sensor Removed:
Reluctor Ring in Distributor: