Again, how are your roads being created/placed? For example if it is like tetris where a player gets a random piece of road to put down, that distance could be already associated with that piece of road as an instance variable. Or you can use sprite width/height. Or you can calculate pixel distance with imagepoints. Depends on your project.
Edit/Disclaimer: I'm no expert on pathfinding, so if anyone knows better please chime in
You can search online for pathfinding algorithms, it is a VERY common problem in the history of programming and well documented as well.