Copying and pasting my post from the
B4 Motor Mount Spacer / Longer Top Shaft thread. You can easily press the gear off using a vise.
I made a longer topshaft for my X-6 by taking the gear off the associated top shaft and putting it on a XX topshaft (part #LOSA3060). You need to drill a new hole in the shaft and cut a groove in the gear for a pin. I used green loctite (sleeve retainer) on the shaft & gear to make sure it didn't move.
You should be able to space out the motor & slipper plates 4mm without a longer top shaft.
Thinking out loud... I wonder if it's possible to move the gear on the stock AE topshaft to gain a little more length. Moving the gear 2mm shouldn't be a problem and will still leave enough length for the shaft to ride in the bearing.