Once the unit is dead the local variable that refers to it, in your case _player, no longer refers to anything.
Try using the player command instead.
i.e.
_location = _this select 0
#alive
hint "alive"
? not alive player : goto "notalive"
~2
goto "alive"
#notalive
hint "waiting for soldier to be alive"
@alive player
#respawn
player setpos getpos _location
hint "teleported"
Then call this code from the init.sqs.
Also, your goto loop is not going to save cpu unless you set the pause larger. Otherwise, just use @(not alive player) which is less cpu intensive than a fast loop, as long as the test condition is simple.