Hello, thanks for reporting! This should happen only on rare ocasions, as the search for a mill looks under a certain radius around the worker, so if the ideal mill is out of the radius, he might default to a "closer" one but requiring more walking. Increasing the radius degrades the overall performance of the game so I can't easily fix it unfortunately.
Hey, nice suggestion, this is actually already in place! Every mill has a list of all trees around it by distance, and workers use it to find their next tree.
But after their bags are full, they run a radius search to find the nearest mill, and that can still have edge cases of finding a mill across the terrain, and a closer one by walking distance is ignored because it was outside the search radius.