04 350 es engine swap to 05 400 at

Hi. .. I just got a 04 Honda rancher 350 es 2×4 that I’m currently converting to 4×4.. in the mix of getting parts I got a 05 rancher 400 engine with the es or automatic selectable tranny.. my question is first is will the 400 engine bolt right in an attach right to everything in the 350 ?? If so , can I use the carb off of my 350 on the 400 ?? An last , will the 400 run , shift by es or auto mode with the 350 es electronics or do I have to switch the wiring harness an computer ??? Thanks in advance