Transverse parton distribution and fragmentation functions at NNLO: the gluon case