<b>Bruce is it difficult to trouble shoot remotely so you have to be my eyes and ears and answer questions specifically.
You have not made it clear if you are putting the black plastic cover back over the flywheel before you set the engine upright or in the normal position it would be in if placed in the
Do you have the Black plastic cover?
If yes, are you putting it on over the flywheel while the engine is still lying flat?</b>
If you turn the SHAFT after you have flywheel on and the flywheel turns with it, then the key is catching properly and is engaging the flywheel.
You can get a new woodruff key at a local hardware store or your machinist friend may be able to get you one. The slot in the shaft is rounded to fit the contour of the rounded side of the woodruff key. The woodruff key can be rocked (or pivoted) back and forth. What you are trying to accomplish is the put the rounded side into the slot, get it level and then push it in to make sure it is seated. Sometimes when you apply pressure trying to seat it, it will pivot as you apply pressure but then you want you level it out flat. Basically all the key does is to make a raised ridge that the slot in the flywheel can catch on so the flywheel will turn when the shaft turns.
Check the slot in the shaft where the woodruff key is inserted to make sure there is no gunk or debris in the slot, preventing the key from seating down all the way, with a small level edge sticking up for the flywheel to catch.
The nut Jim was referring to is the what you put on after you get the engine back in the bike and put on the clutch unit (if it is a single speed) or the automatic speed governor (if it is a variable speed). The nut secures either of these assemblies on the shaft and also would help keep the flywheel in place. Don't forget to put the spacer on the shaft before you put on the clutch or speed governor. If it is a single speed model, the spacer is shaped like a little top hat, the brim or wider side goes toward the engine with the smaller side pointing outwards.
I don't know what kind of mallet you used to whack the flywheel, but it should be a rubber mallet (not plastic or metal). You should only whack the flywheel around the outer top edges, just enough to dislodge the flywheel from it's normal seated position. You should NOT whack the end or side of the shaft.
Let us know.