code: public static double distance(Geometry geometry1, Geometry geometry2,
  			SpatialReference spatialReference) {
  		OperatorDistance op = (OperatorDistance) factory
  				.getOperator(Operator.Type.Distance);
  		double result = op.execute(geometry1, geometry2, null);
  		return result;
  	}
docs: Calculates the 2D planar distance between two geometries.
  
  See OperatorDistance.
  
  @param geometry1
  Geometry.
  @param geometry2
  Geometry.
  @param spatialReference
  The spatial reference of the geometries. This parameter is not
  used and can be null.
  @return The distance between the two geometries.