Dude. If you're going to swap in a 3.4, just fix your existing transmission and use it. It'll bolt right up. You'll barely know you're doing an engine swap.
On the other hand, to use the transmission behind the 3.4 will be a complete PITA and an utter waste of your time and money. You'll have to do mad custom fab to get a 3rd gen driver drop differential into a 2nd gen truck, or you'll have to pay crazy money for an adapter to put a passenger drop transfer case behind the 3rd gen transmission. It's a horrible horrible idea.
People have told you this in other threads. They were perhaps a little more polite than I am being right now, but polite doesn't seem to be getting through to you. You've already been given some great advice by some very smart people. If you don't like it, great, go do your thing, but stop coming back and asking us how to do your thing. None of us know how to do it the way you're stuck on doing it, because none of us would do that, because it's silly.
Hope this helps.