  We calculate in this paper the perturbative gluon transverse momentum
dependent parton distribution functions (TMDPDFs) and fragmentation functions
(TMDFFs) using the exponential regulator for rapidity divergences. We obtain
results for both unpolarized and linearly polarized distributions through
next-to-next-to leading order in strong coupling constant, and through ${\cal
O}(\epsilon^2)$ in dimensional regulator (finding discrepancy for the linearly
polarized gluon TMDPDFs with a previous result in the literature). We find a
nontrivial momentum conservation sum rule for the linearly polarized component
for both TMDPDFs and TMDFFs in the ${\cal N}=1$ super-Yang-Mills theory. The
TMDFFs are used to calculate the two-loop gluon jet function for the
energy-energy correlator in Higgs gluonic decay in the back-to-back limit.
