Minecraft wiki entry for locate, associated text: In Java Edition, structures in the Anvil chunk region of the command's execution are prioritized over others due to a bug, meaning the found structure is not necessarily the closest.[1]