We have prepared the ternary nitride Gd2Fe17Nx (with x close to 3) and have studied this compound by means of X-ray diffraction and 155Gd Mössbauer spectroscopy. Our results show that X-ray diffraction is not always a sufficient means to test whether the charging process with N2 gas has reached completion. From the analysis of the 155Gd Mössbauer spectrum of Gd2Fe17Nx it is derived that the electric field gradient at the Gd nuclei is 12.6(2)×1021 V/m2. This value is substantially larger than that found at the Gd sites in Gd2Fe14B. Its implication on the crystal field induced anisotropy in R2Fe17Nx compounds is discussed.