GDE: A Distributed Gradient-Based Algorithm for Distance Estimation in Large-Scale Networks