Understanding the atomic structure of glasses is critical for developing new generations of materials with important technical applications. In particular, the local environment of rare-earth ions and their distribution and clustering is of great relevance for applications of rare earth-containing glasses in photonic devices. In this work, the structure of Gd2O3 doped lithium and potassium aluminosilicate glasses is investigated as a function of their network modifier oxide (NMO–Li2O, K2O) to aluminum oxide ratio using molecular dynamics simulations. The applied simulation procedure yields a set of configurations, the so-called inherent structures, of the liquid state slightly above the glass transition temperature. The generation of a large set of inherent structures allows a statistical sampling of the medium-range order of the Gd3+ ions with less computational effort compared to other simulation methods. The resulting medium-range atomic structures of network former and modifier ions are in good agreement with experimental results and simulations of similar glasses. It was found that increasing NMO/Al ratio increases the network modifier coordination number with non-bridging oxygen sites and reduces the overall stability of the network structure. The fraction of non-bridging oxygen sites in the vicinity of Gd3+ ions increases considerably with decreasing field strength and increasing concentration of the network modifier ions. These correlations could be confirmed even if the simulation results of alkaline earth aluminosilicate glasses are added to the analysis. In addition, the structure predictions generally indicate a low driving force for the clustering of Gd3+. Here, network modifier ions of large ionic radii reduce the probability of Gd–O–Gd contacts