I think you could. You'd need the PCM from the TB, for sure. In '05, GM moved the transmission programming to a separate 'TCM' (attached to the outer trans case.) That's something the '04 PCM wouldn't know about - it has the trans mapping as well as the engine controls in one PCM. So, if you do it, it might (?) be best to swap as a full engine / trans combo. But the trans is essentially the same between both, except for what's controlling its programming.
The LH6 was among the first of the '4th-gen' LS engines; the LM4 was among the very last of the '3rd-gen', with the attendant differences in both. The main difference was the DOD capability (there are others, but I'll not detail them here - easily found elsewhere.)
I don't know of anyone who's done a swap of this type. If I were to guess, I'd say it might require removing the front side of the truck (grill, bumper / fascia, along with the hood, rad / fan, etc.) But you can probably leave the fenders in place.
Which would be easier? Probably doing the DOD delete, especially if you know your way around the engine.
Depending on what your friend is charging you for the LH6, coin flip for 'cheaper'.