Having problems with the 'distance=' command in Minecraft 1.13.2

Solution 1:

Chain command blocks will only run if:

a) it's touching a command block that is pointing towards it, and
b) the command block that it's touching runs at least once.

If either of those are false, then the chain command block will not run. Even if they are one block away, the repeat block will run, but the chain will not because the repeat command block is not touching it.
If they are not touching, then the command block that is a chain command block needs to be a repeat block itself or touching the repeat block while the repeat block is pointing towards it.

Hope this helps!