Problem in generation of the topology and .gro file

You need to make sure that your atoms are named correctly according to the topology database entries. There doesn’t seem to be a CG2 atom in residue 5 (THR) in your input file.

See if Residue mapped into topology database but atom name not found in file? - #10 by amei or Fatal error: Residue 1 named GLN of a molecule in the input file was mapped to an entry in the topol helps.