Honestly 0% chance of it being a direct swap. Sure they're both Yamaha but that means nothing for bike fit.
If you buy the motor you can probably make new mounting hardware but you'll need so much more to make it work (proper carbs, so new carb holders, proper airbox, etc. etc.) I wouldn't...