If that first code is actually a P0340, it means your PCM isn't seeing a cam signal, Robb. The P1388 somewhat confirms that, as the ASD relay control circuit code can appear along with a major engine rotation/ timing sensor problem like this.
While the P1388 won't cause the P0340, it's quite possible that you have only one problem working... the other code is just thrown in to round out the field.
Check for disconnection at the connector that comes out of the base of the driver's side of the distributor, which is your cam sensor. Inspect it for any sort of wiring damage in the area, like harness abrasions or critter chews. I doubt a critter chose that moment to climb up under your hood... but it might be something left over from another time.
If OK, the list of things to look for start to dwindle a bit...
You need to have distributor rotation, which means the timing chain has to be intact.
The reluctor that passes through the cam sensor has to be attached to the distributor shaft (can break off).
The cam sensor has to have its two power feeds and one ground. I can describe that in more detail if you have a digital voltmeter handy.
And if they're all in place... it appears you lost your cam sensor. A quick check of the underhood fuse block (the PDC) for blown fuses would be a good idea with the P1388 being present, but it seems unlikely that you developed two separate problems in that short of a time. The large fuses would be the ones to inspect... the road map under the lid of the PDC will tell you which ones are related to engine operation (look for clues like PCM, ignition or fuel pump in the description). I believe the one you'll be looking at is a 20 amp.
Getting to the cam sensor is a bit of a chore on these trucks thanks to the overhang at the back side of the engine. You'll need a normal-sized #2 Phillips screwdriver for the cap and then I also take the plug wires loose at the cap to allow the thing to be flopped off to the passenger side. Plug wire numbering is present on OEM cables and the firing order goes 1-8-4-3-6-5-7-2, with #1 cylinder being at the driver's side-front and the cap is wired clockwise. #1 location is probably cast into the cap and is at the (roughly) 9 O'clock position as viewed from the front.
Once out of the way, simply lift the cam sensor off the distributor housing. Nothing holds it but the cap.
Below there is the reluctor, a half-moon bowl-shaped thing that should be attached to the distributor shaft. It's super-rare to have one fall off, but if it did... the cam sensor might be wrecked as it came into contact with the thing. Take a flashlight and mirror if needed... it's tight back there.
Get back with me if you have any questions and we'll push on from there. I'd love to hear what you found if nothing else!