After some help

I recently fitted a 2006 MK5 Golf 2.0 TDI BKD 140 engine to my 2004 Mk5 Golf that also had a 2.0 TDI BKD 140 engine in. My old engine (2004 one) had the crank timing mark in the trough of the sprocket and the new engine (2006 one) has the timing mark in the tooth of the sprocket. The crank sensor is from the 2006 engine (the new one) and the cam sensor is from the 2004 engine (the old one). The car is now very hard to start and is showing error code P0727, has anyone done this engine change and had the same issue? or can anybody please shed some light as its driving me insane.

Thank you very much!