Possible causes
Faulty Powertrain Control Module (PCM)
Powertrain Control Module (PCM) harness is open or shorted
Powertrain Control Module (PCM) circuit poor electrical connection
Low battery voltage
A common cause for the P0601 is unplugging the computer with the battery connected.
If you do replace the PCM, yes it does have to be programmed after installation, unless you have the equipment to bench program it. Your source for the PCM should be able to do this. If not, find one that can install the correct program for your vin.
Then you may still have to do the security re-learn to coordinate with the BCM. That is the on for 10 minutes then off 3 times procedure you mentioned. That can't be done before hand.
Find a step by step re-learn procedure in a service manual or online for your truck (not a similar one) and follow it step by step. You'll need a good battery that is fully charged.