Early in the formation of the solar system, the region beyond Mars is thought to have been the source of water-rich planetesimals whose impacts are believed to have later brought water to Earth and Mars. We report the discovery and characterization of five iron meteorites that have young oxygen isotope ages indicating that their planetesimal parent body formed just a few million years after the formation of the first solid material in the solar system. These meteorites are also enriched in volatile elements, including water, suggesting that they formed relatively close to the sun where temperatures were not too cold for these elements to condense. We propose that material from the source of these meteorites might have been incorporated into the Earth and Mars when volatile-rich planetesimals delivered water and other volatile elements to these planets.