As SAATR said it's possible the cam retard is not correctly set. This will be because someone either thought they could simply adjust the timing like pre-Vortec where you just turn the distributor while watching the timing mark...nope...or possibly stabbed wrong while replacing bad original intake gaskets Vortec small blocks are so notorious for. HOWEVER...do note, it generally has to be way out of adjustment before you ever see that code. I've seen cam retard way off with no P1345.
Another possible cause, and very likely, is simply distributor wear. They get sloppy at the top end (also at the bottom, many had improperly hardened distributor gears and they wear out real bad, real soon) and let the rotor flop around, screwing up everything. Take the cap off and try moving the rotor/shaft side to side. If it won't move, turn it and it may pop up a little, then try moving it side to side while it's popped up. If you can move it sideways really any noticeable amount at all, that distributor is shot.
To set your existing, or new distributor, you will need a scanner capable of reading cam retard. Before you ever pull a Vortec distributor make 2 marks, both the distributor body position, and rotor position. Install the new distributor in the same position. Then, use scanner to fine-tune cam retard by holding RPM's to 1,000 while adjusting distributor until you get it to zero, at least within +/- 2 degrees of it.
Richard