Minecraft wiki entry for Target_selectors, associated text: Examples in Java Edition:
@e[distance=10] — Target all entities exactly ten blocks away.
@e[distance=8..16] — Target all entities more than eight blocks, but less than 16 blocks away (inclusive).