Extragalactic very-high-energy (VHE; E > 100 GeV) sources are unique objects to study the most powerful particle accelerators in nature, as active galactic nuclei are likely sources of ultra-high-energy cosmic rays. BL Lacertae blazars are the most frequent extragalactic objects found in the VHE gamma-ray catalogs. It is very difficult to estimate their redshifts, considering they have no strong enough optical spectral features, hence ∼20% of them have unknown or poorly constrained redshifts. KUV 00311-1938 is a VHE BL Lacertae blazar, with an uncertain redshift in the range of 0.5 < z < 0.98. We have obtained deep spectroscopy using Gemini and the GTC telescopes of KUV 00311-1938 and its surroundings with high signal-to-noise ratio in 2016-2017. The lack of features did not allow us to determine the spectroscopic redshift of KUV 00311-1938; nevertheless, we obtain a lower limit of z ≳ 0.475. We determined the redshifts of 41 galaxies observed in the field-of-view of the blazar and through a population study, identified three pairs and four groups consisting of 3 or 4 members with redshifts in the range z = 0.1468-0.4756. Due to the absence of a large group of galaxies, we could not associate KUV 00311-1938 with any of the groups detected.