code: public static MultiLineString convert(MultiLineString multiLineString, int dimension) {
          int nb = multiLineString.getNumGeometries();
          final LineString[] ls = new LineString[nb];
          for (int i = 0; i < nb; i++) {
              ls[i] = GeometryCoordinateDimension.convert((LineString) multiLineString.getGeometryN(i),dimension);
          }
          return gf.createMultiLineString(ls);
      }
docs: Force the dimension of the MultiLineString and update correctly the coordinate
  dimension
  @param multiLineString
  @param dimension
  @return