Carl,
keep in mind that a MTH-motor is fixed to the truck and as swiveling in curves relative to the locomotive frame. In a narrow hood diesel engine the Legacy motor sensor board could touch the wall of the hood and prevent operation in narrow curves; you should check that bevor installation.
It could be that the shaft diameter of the Lionel Mabuchi is different from the MTH Mabuchi. Lionel has in use two different shaft diameters 2,0mm and 2.3mm. Maybe a different flywheel is required.
Albrecht