We present results from the analysis of 2997 fundamental mode RR Lyrae variables located in the Small Magellanic Cloud (SMC). For these objects near-infrared time-series photometry from the VISTA survey of the Magellanic Clouds system (VMC) and visual light curves from the OGLE IV survey are available. In this study the multi-epoch $K_{rm s}$-band VMC photometry was used for the first time to derive intensity-averaged magnitudes of the SMC RR Lyrae stars. We determined individual distances to the RR Lyrae stars from the near-infrared period-absolute magnitude-metallicity ($PM_{K_{rm s}}Z$) relation, which has a number of advantages in comparison with the visual absolute magnitude-metallicity ($M_{V}-{rm [Fe/H]}$) relation, such as a smaller dependence of the luminosity on interstellar extinction, evolutionary effects and metallicity. The distances we have obtained were used to study the three-dimensional structure of the SMC. The distribution of the SMC RR Lyrae stars is found to be ellipsoidal. The actual line-of-sight depth of the SMC is in the range from 1 to 10 kpc, with an average depth of 4.3 $pm$ 1.0 kpc. We found that RR Lyrae stars in the eastern part of the SMC are affected by interactions of the Magellanic Clouds. However, we do not see a clear bimodality in the distribution of RR Lyrae stars as observed for red clump (RC) stars.