No way will 400 engine fit. Rear swingarm bolts to rear of engine. You'll have to hack off most of rear of 300 frame to fit 400 engine. Which may make it nice and squisshy. Probably a lot of forward section of frame too as 400 sits high up in between perimeter frame. So you'll have to tilt 400 engine downwards at front if you don't cut out 300 backbone. It's easier to just build custom frame.
Not just engine, you'll need from 400:
- rear swingarm, shock & linkage
- rear wheel, sprocket and brakes
- tank & fuel-pump
- throttle-bodies, injectors and TPS
- airbox & MAP sensor
- exhaust, muffler, O2-sensor
For effort, you might as well get crashed and totaled 400 for ~$2000.
If you want more power with engine-swap, go with EX500. Much, much easier swap and more power than 400.
Best deal is used 300 engine. See them on craigslist, eBay and junkyards for about $200-400. Add $100-150 shipping. There's one with 12k-miles for $350 on eBay right now. Or $200 needing rebuild. Can swap engine in about 2-hrs