Hello, my name is ***** ***** I am a professional here at Just Answer. I have noticed that your question was not getting a response and thought I would see if you still need help with this.I apologize for the delay and I hope I can still assist you with this here.
The problem you are describing with the loss of spark can be caused by any of the following,
Defective Camshaft Position Sensor (CMP)
Defective Crankshaft Position (CKP) Sensor
Swapped Crankshaft Position (CKP) Sensor Connector — Connectors swapped with the Turbocharger Control Valve (TCV)Engine
Control Module (ECM)
Main Engine System Relay 2/32
Main Engine System Relay 2/32 Wiring
Open Wiring Harness
Shorted Wiring Harness
In order to determine which is failing you are going to need to do some testing while the problem is occurring. I have enclosed the steps in the link below, copy and paste the link to your browser to open and view them.