That motor shaft was meant to slip fit into a planetary gear box, if there is enough shaft left after the sprocket is on the shaft (with motor running) you could use a mototool type grinder with a cutoff wheel to grind a retaining ring groove into the "d" shaft