As I am not allowed to comment, it may be a pain for me to answer correctly with the little knowledge I have.
I have tried a few things, I think you may get away with using a RigidBody2D as a base for the player's collision box' duplicate (let's call it a ghost). This node has a get_colliding_bodies function that returns an array. If the array is empty, then you can teleport to the desired location.
you can check it with something like that :
if get_colliding_bodies().size() == 0:
player.teleport_to(position)
To work, this piece of code would require to be in a script attached to the RigidBody2D, with a reference to your player stored in a variable called player. You would also need a function called teleport_to in the player script, but keep in mind this is just an example.
You may want to use this in a properly set function to check at the right time. For instance when the space key is released.
Here I am assuming that everything is pretty much set up in your scene and that the only issue is that you do not know how to check if there is a collision on the arrival position. I hope that would help you.