Ditto, inspections in many states will be problematic putting an older engine in a newer truck that had different emissions.
Also, these days the PCM communicates, directs, or actually controls things like the A/C clutch, speedometer, tachometer, body control module (Fuel level, lights, other gauges.), and such. Not familiar with that 2009 system but be aware this could be much more challenging than just getting an IDI to fit and hooked up. You may be losing gauges, heating/cooling, auto lighting, and other things. So, there could be countless hours of work IE more than fixing/swapping the 6.4l engine. From what I have read the biggest death of these is stuck injectors at high mileage washing out a cylinder. It's too bad the truck does not sense this and set the check engine light. (Maybe it does, and owners ignore it.)
Also, that would hurt resale value and ability to sell the truck down the road. Personally, I do not like to get deeper into a truck than what I can get for it.
Also, if economical to acquire, perhaps just bullet proof the engine in it. Then have a faster, more powerful truck, and send it for another 200K miles. In my area that is a $10-12K truck in good shape running. So, if you can buy it for 2k or less, put in 8K or less. You are at bluebook (At least in my area.) and you have a rebuilt engine that has all new belts/hoses/thermostat/water pump, rebuilt injectors and pump, and other new/rebuilt parts. Maybe call around (Including some states around you.) to see who would do that for a good price. Perhaps just farm it out because the truck running has value.
If you do not want to go to that much work or expense, then perhaps you keep looking for a blown up IDI or if not an issue for inspection in your state (Or you can get a waiver.) buy a gasser and convert. That would be a much more straight forward install of your IDI.