code: private static double computeDistance(Geometry geometry, Point vertexPoint, double tolerance) {
          DistanceOp distanceOp = new DistanceOp(geometry, vertexPoint, tolerance);
          return distanceOp.distance();
      }
docs: Return minimum distance between a geometry and a point.
  
  @param geometry
  @param vertexPoint
  @param tolerance
  @return