How do I teleport a zombie to me every time it gets too far by using a command block?

Solution 1:

as executes a command as your person, (so for example kill @s would kill you and not the command block), you want at, which executes at your position.