I've done A LOT of research in this arena.
The net of it is:
There is a company that makes a "translation computer" that will work in our trucks. This unit translates the PCM inputs/outputs from a standalone computer ( think motec or the Ford version). This means that it tricks the other computers to think that the new PCM is the factory-installed unit. This is how you'd maintain functionality.
The downside is, wholesale on the unit is like 10 grand USD.
So, you could make it work, but you aren't motor swapping for less than 30K and you have a LOT to hash out.
The main reason that this was intriguing is that it would allow you to maintain the braking programming, steering programming, and stability control.
The other option would be to rewire the entire truck.
either way, I don't think that it can be done for less than 30K.
For me, for the moment, my motor is fine. I don't love it, but it works. I'm focusing my upgrade money on safety ( cage seats, harnesses, better brakes). When my motor pops, I'll either stroke it or V8 swap it. I'm hoping to get one more year out of the stock motor.