Probably yes, if you go for a complete gearbox and sprocket. Depending on the clutch you have on your bike, it might need some work to it, but this basicly regards the sprocket nut. The gearboxes themselves are interchangable, but the parts are not (at least not all of them).
I did it the other way round, fitted an old 50’s gearbox to a 90's engine.
Andreas