The redshift selected sample of long gamma-ray burst host galaxies: the overall metallicity distribution at $z < 0.4$