Community Detection in Networks using Graph Distance