It is worth noting that 1 ml of water = 1 gram only under the specified conditions of temperature and atmospheric pressure, as well as the purity of the water, including dissolved gasses in it.
For years the definition of a meter was based on a master standard bar locked up in a Paris vault. However, that bar became distorted over time and as a result scientists recently adapted a new standard for length, one based on a reproducible physical property.