Havent had to change an ECM on a newer model truck, but as long as you bought the same engine and transmission type, the ECM will just hook up, no prob. I`d recommend hitting all the connections with Radio Shack TV tuner cleaner/lube while you got em apart.
Have you tried an APPS reset? Sounds like you might have a dead spot thats causing this. Take off the batteries for 30mins, then reattach batts. Turn key on, do NOT start. s-l-o-w-l-y push the go pedal from 0 to max 3 times, then turn off the key. Then start and give her a shot. May have to replace the APPS if it comes back. I dont agree an ECM would cause this, if it was bad, you'd have nothing.
Got any codes?
On my old 05, I had a prob at the dealer, my ECM could not be "read" by the starscan because of a security key module added by the dealer when I purchased the truck (the SLIM module). Dealer said they needed the truck for 24hrs to do some kinda weird program, but the truck ran fine, so I said screw it.
good luck
-j