“I have found that no exertion of the legs
can bring two minds much nearer to one another.”
Thoreau is explaining how you do not need to live in society or near other people to have relationships and connections. Just because you live close to someone does not mean you are actually spiritual close to them where you can understand them. Even when you are in a community, you can still be lonely.