We present J- and K-band luminosity functions (LFs) for the group evolution multiwavelength study (GEMS) sample of 60 nearby groups of galaxies, with photometry from the Two-Micron All Sky Survey (2MASS). We find that, as seen in B- and R-band photometry of a subsample of these groups in our earlier work, the LFs of the X-ray dim groups (L x < 10 41.7 erg s -1 ) show a depletion of galaxies of intermediate luminosity around M K = -23, within a radius of 0.3 R 500 from the centres of these groups. This feature is seen neither in the X-ray brighter groups nor in either kind of group when the LFs are determined all the way out to R 500 . We conclude that an enhanced level of star formation is not responsible for this feature. From the faint end of the LFs, we find support for the underabundance of low surface brightness dwarfs in the 2MASS. We find that for all kinds of groups, the modelling of the LF, with universal forms for the LFs of galaxies of different morphological types, fails when simultaneously required to fit the B- and K-band LFs. This means that the dip-like features seen in LFs are not merely due to the varying proportions of galaxies of different morphological types among the X-ray dim and bright groups. We argue that this supports our hypothesis that this feature is due to the enhanced merging of intermediate-mass galaxies in the dynamically sluggish environment of X-ray dim groups.