GRANCAIN (GRAN CAmara INfrarroja) is a first-light imaging instrument in the infrared J, H and K bands that will be integrated into the adaptive optics focus of the Gran Telescopio de Canarias. The purpose of the instrument is to capture SWIR diffraction-limited images for a field of view of 22x22 arcsec. The instrument boasts a telecentric optical design with a collimator-camera configuration featuring a 2:1 magnification ratio. Housed within a 160-liter aluminum cryostat, its optical path includes a cold stop, a filter wheel, and a 4Mpx Hawaii-2 PACE Teledyne detector, meticulously engineered for operation at 77K. The optics is held in place by black anodized 6061-T6 aluminum supports. These mounts serve the critical purpose of precisely positioning the optics along the Z optical axis. The opto-mechanical frames contain adjustment elements in five degrees of freedom (all except the clock) for optical alignment and to compensate the thermal differential contractions that occur during the cooling-down process. Additionally, the lens-housing cell combines different geometries and materials with different coefficients of thermal expansion to avoid stresses on the glass so as not vary its relative position. A symmetrical and athermalized opto-mechanical design, free of residual stresses, helps to minimize the deviations of the optical axis and thus facilitates the iterative process of optical alignment in cryogenic conditions. A strict manufacturing and metrological control process were necessary in order to achieve the objectives for optimum image quality. The article contains a detailed description of the design, fabrication techniques, metrology, integration, alignment, and testing of the athermalized opto-mechanical elements.