Can a 6.2L ford engine be swap out into a5.4L ford F-350 super Duty 2008?

Can a 6.2L ford engine be swap out into a5.4L ford F-350 super Duty 2008?

Isn't the 6.2 a diesel? Swapping a diesel for a gas engine is a lot of work, as the transmissions are calibrated differently, diesel engines are heavier, and the engine management computers are different. Much easier, and probably cheaper, to just trade the gas truck in on an oil burner…

I suspect you would have to change much more than just the engine.
All those little electronic boxes trying to talk to each other nowadays.
I haven't picked up a repair manual yet, so I can't even say if the tranny will bolt to the motor.