Any engine will as long as they are aligned correctly.
The only coupling between the engine and the transmission is the belt. Basically you are re-engineering the quad. Things like this have been done before. Many successfully and some not so much, but how much time and expertise do you have to devote to the project.
Many years ago I put a Kawasaki 750 three cylinder engine into a BSA 650 twin frame for flat tracking. The bike was fast, but it never finished a race. I ran out of money and desire.
To begin with, the engine was too wide for a flat-tracker and the alternator side of the engine dug into the dirt in the corners. My first attempt at a fix was a steel plate welded to the frame to protect the alternator. That resulted in lifting the rear wheel off the ground when pitching the bike into the turns, so narrowing the engine became the priority. I removed the alternator and mounted the alternator on a plate behind the carburetors. This required cutting the end off an old crankshaft, fashioning a bearing holder and fabricating sprockets to couple the two parts. This arrangement had the alternator turning in the opposite direction which didn't affect the operation of the alternator, but the sensors for the CDI were also driven by the alternator. They had to be rewired to get a correct firing order and adjusting the timing was a nightmare. Finally got that all worked out and the bike ran and the clearance issues were resolved, but the engine would overheat and seize pistons, so it was necessary to modify the cylinders for better cooling. I had the fins built up for more surface area - not good enough. I had the fins drilled and copper tubing pressed through the holes for more surface area. This worked, but the center cylinder ran hot and suffered from detonation. I had the head modified for better cooling. Everything I did improved the project, but in the last race it ran in, it suffered a fuel delivery problem, one carb ran out of gas and the engine 'cold' seized. With no heat from combustion and the cold intake air hitting that side of the piston, the piston changed shape and seized. Although the bike was fast and all the logistical problems were overcome, the longevity problems were just starting. The project was scrapped due to cost and loss of interest. My drag racing interest had been sparked and the 900 Kawasaki had just been introduced.