The 5AT and 6MT use different specifications of the J35 engine (J35Z2 and J35Z3). There have been some posts on here in the past that have addressed different aspects of this attempted swap. I’d recommend using the search function to look up some of those threads. IIRC, you’re going to run into some issues with the wiring harness and ECU - be ready to swap out some stuff beside the transmission itself. Of course, I’ll defer to members on here who have attempted this swap previously.
Edit - I think the path of least resistance will be to rebuild your current transmission, or buy a remanufactured unit. It’ll probably work out to be the cheapest option, in the long run. Just my $0.02.