Gravitational-wave observations of binary neutron star mergers and their electromagnetic counterparts provide an independent measurement of the Hubble constant, H0, through the standard-sirens approach. Current methods of determining H0, such as measurements from the early Universe and the local distance ladder, are in tension with one another. If gravitational waves are to break this tension, a thorough understanding of systematic uncertainties of gravitational-wave observations is required. To accurately estimate the properties of gravitational-wave signals measured by LIGO and Virgo, we need to understand the characteristics of the detector noise. Non-Gaussian transients in the detector data and rapid changes in the instrument, known as nonstationary noise, can both add a systematic uncertainty to inferred results. We investigate how nonstationary noise affects the estimation of the luminosity distance of the source and therefore of H0. Using a population of 100 simulated binary neutron star signals, we show that nonstationary noise can bias the estimation of the luminosity distance by up to 6.8%. However, only ∼15% of binary neutron star signals would be affected around their merger time with nonstationary noise at a similar level to that seen in the first half of LIGO-Virgo's third observing run. Comparing the expected bias to other systematic uncertainties, we argue that nonstationary noise in the current generation of detectors will not be a limiting factor in resolving the tension on H0 using standard sirens. Although, evaluating nonstationarity in gravitational-wave data will be crucial to obtain accurate estimates of H0.