We've replaced the computer, sensor and timing belt(not sure of we did it right). Relays are good. Truck will fire, stay running for about 30 seconds then bog down & die
P0340 is a Camshaft Sensor "A" Circuit Bank 1 code. This could be either a wiring issue, sensor failure, or camshaft/crankshaft timing issue.
Since you've replaced the timing belt, computer and sensor. I'd suggest you confirm sensor signal output at the sensor and at the computer. The two wire sensor produces a AC signal with an amplitude of roughly 4vAC with an average of 2.5vAC. The dark blue with orange stripe wire is the shielded signal wire, the gray with red strip wire is a common ground provided by the computer.
If you get the same readings at both the sensor and the corresponding computer pin than the wiring is OK. You can double check by doing a continuity test from the sensor to the computer.
To check the engine timing take a look at this image.
You can see that the camshaft mark (black triangle), oil pump sprocket mark (diamond) are lined up with a corresponding mark on the inner timing cover. While the crankshaft keyway is pointing at 12 o'clock.
If cam/crank timing is off make sure when you rerun the belt that the slack is on the tensioner side of the belt. Once you put tension on the belt rotate the engine by hand 720° or two revolutions and verify that the timing marks are lined up correctly.