When you switch ECM's, your truck probably will crank, but won't start.
Here's how you "teach" the truck your new ECM:
Turn ignition on
Try to start (it won't)
Leave ignition on.
In 10 minutes exactly the SECURITY (lock) light will turn off.
Try to start (it won't)
Leave ignition on.
In 10 minutes exactly the SECURITY (lock) light will turn off.
Try to start (it won't)
Leave ignition on.
In 10 minutes, the light will go out, and it will start up, and will "marry" the ECM to the BCM permanently.
This will even work with locked "pre-programmed" ECM's so you can test them on other trucks.
I'm pretty sure I've posted this before, but just in case, I posted it again.