Go to Object Editor, click on the Building you want to edit, find "Pathing - Pathing Map" change it to others instead of Castle, Keep, Town Hall, Fortress, Great Hall, Stronghold, ...
Changing the size will not help...
the gold mine has a ability called (gold mine ability)
if you remove that from the gold mine then you can build a townhall closer to the mine
...is perfectly adequate to solve the issue.then make a trigger to add the ability to the gold mine when its done building
or remove the return lumber/gold ability from the towerhall and trigger it to add it again to the townhall when it has finished building