the distance parameter for the targeting of entities does not work and just returns "No entity was found" and i changed the value from 1 to 10 around entities if i remove it it seems to work fine
/data get entity @e[distance=10,limit=1] {} does not work
/data get entity @e[limit=1] {} does work
hopefully this debug file can be a good reference
distance=10
will only target entities at exactly 10 blocks from your position. For a range value you have to use the notationdistance=..10
.