Forretress used Protect! Galvantula used Volt Switch!
It obviously won't hit, but do you still have the option to switch out?
No, U-Turn/Volt Switch needs to hit the opponent in order for the Pokemon to switch out.
U-Turn/Volt Switch Description : After making its attack, the user rushes back to switch places with a party Pokémon in waiting.