Next to the B/S engine a Kohler Command 18-25HP would be an easy fit. Compare wiring from the 1641 to an 1864(as example) tractor. Magnums are pricey on parts and thirsty on gas by comparison.
That doesn't mean you can't easily install one; reference a model 1862 CC as an example.
All you need to do is a parts comparison from the 1641 to an 1862 (Magnum) or 1864 (Command) and work from there. May take a driveshaft adapter, wiring changes and such but it is a relatively easy swap in either case. Regardless of engine choice, NEVER apply any (+) voltage to the engine's white wire, that is the "ground-to kill" wire and if power is applied it will wipe out the ignition module(s) of the engine.
It will require using the appropriate Cub Cadet muffler which is narrower than the stock Kohler muffler. Needed to fit within the confines of the hoods.