Here, look at this amazing pathfinding algorithm you should use. It takes you to the wrong place 30% of the time but humans do it too so that's ok.