I have a teleporting ability from a projectile that sometimes breaks my character's movement

I would like the location to adjust and not just return invalid as I have a lot of caves and weird shapes in the environment. I do not know how to check for an available bounding box location nearby, if there is even any available on a decent nearby threshold search.