first port of call is to drop the oil and see if it is a cog that has given up (lots of metal fragments in oil) as it might be the selector star detent. by and large the SV gearbox is bulletproof but detents have been known to give up.

gearbox is a big job on the SV as its a complete strip down as the block splits vertical. thats two heads, cam chains etc.etc before you even get to splitting the block. its also a full gasket set.

my advice for what its worth. if it is the gearbox then get another engine or sell the bike as a non runner/part it out and cut your losses.

+1 to Bibio's advice. See what's in the oil and if there's lots of metal, then take it from there.

In some cases there is an argument for repairing your current engine rather than buying another used one, but again as Bibs said, an SV strip is a major job. As most SVs are written off in crashes rather than because the engine has died, you're probably better off just sourcing a used motor.