I'm much closer to sydney than melbourne but while using nextdns DNS servers, pinging google gives me their melbourne server.
PING google.com (188.8.131.52) 56(84) bytes of data. 64 bytes from mel05s02-in-f14.1e100.net (184.108.40.206) icmp_seq=1 ttl=52 time=38.5 ms
While using cloudflare's 220.127.116.11, I get sydney's server
PING google.com (18.104.22.168) 56(84) bytes of data. 64 bytes from syd15s16-in-f14.1e100.net (22.214.171.124) icmp_seq=1 ttl=52 time=21.1 ms
I've set up the DNS server through systemd-resolved