Analysis of charmonium production at fixed-target experiments in the NRQCD approach