That generally means that the pump shaft isn't seated in the oil pump...
Actually there is supposed to be a spring clip washer on the oil pump shaft that butts up against the top of the crankcase. It's purpose is to keep the oil pump shaft from coming out when you remove the distributor.
Otherwise...
That is what chewing gum is for...
Clean the shaft end where it sticks in the distributor, and clean the socket with some acetone or brake parts cleaner. Chew up some gum and stick it in the socket on the bottom of the distributor shaft. Stick the oil pump shaft in the gummed socket. Give it several healthy shakes; it should not come out. Install the distributor, you may have to turn the rotor to get the shaft to fit into the oil pump.
If you don't want to gum up the works, a 12" long piece of 1/4" thin wall vacuum tubing will slide over the shaft and hold onto it. A long, thin rod inserted into the tubing will enable you to remove the tubing once the pump shaft is in place. Push on the rod and pull on the tubing. Again, you may have to turn the tubing to get the shaft to mate up with the socket in the oil pump.
Solution for fixing an oil pump shaft that isn't engaging the pump but didn't fall down into the oil pan.
Watch ALL the video, it is a little long, but well worth your time.
View: https://www.youtube.com/watch?v=a1yo0K4xIHA