I'm guessing that no one can understand how if it came off, it won't go back on. You ARE lining up the key and both keyways, right? Sometimes with a half-moon key it is a bit tricky to get the leading edge of the key to start in the keyway of the pulley. I just try to be sure that the keyways are both very clean (wire brush is good) so that the key can easily seat fully, then gently tap it into the shaft keyway, leaving the outboard edge just slightly (VERY slightly) lower than the inboard edge. Once you tap the pulley on enough that it just barely starts into the pulley keyway, it is sometimes good to again very gently tap the key again to "level" it so that it will easily enter the pulley keyway the rest of the way and not "cock". Granted, all hard to do while upside down and vertical with limited clearance and visibility!
Replacing the crankshaft would just involve removing and fully disassembling the engine.
- Jay