If the halyard has jumped the sheave and is stuck beside it, you might be able to clear it with your spinnaker halyard if you have one. Put a shackle around the stuck halyard with a line attached so you can pull it back down, and raise this all the way up with the spin halyard. By pulling on both lines you might be able to lift it out from under the sheave and pop it back into its groove. Use binoculars to see what you're doing.
Could be the sheave has a chunk broken out of its side, and if so, it will just get jammed again. You'll have to replace it, and might as well do all of them.