Are you sure about this? The code looks fine.
Not 100% but that's how it seemed to be at the time. I'll describe the problem i had and see if you can work it out.
I updated my tutorial solvers walking methods to use web walking and that's when i noticed it. So i'm thinking it might be to do with that web problem i told you about. Basically i was in the cooks house making bread. When it was finished it kept spam clicking on the map coordinate where the door that i entered the house is, not the one you use to leave. I'm using nearestTo(Coordinate) to get the correct door to build a path to.
As you can see, this sounds very similar to the web walking problem i told you about, where my wolrd walker gets stuck trying to walk to varrock on osrs. It spam clicks a coordinate just past the lumbridge chickens and continues to do so until you move it a few tiles past that location, then it continues on its way perfectly fine.
Also, i'm pretty sure upon changing from webwalking to regionpath on tutorial solved this issue.