The 22-year-old, who scored 36 goals for Forest Green last term, has failed to make a first-team appearance for the Addicks since moving to The Valley in the summer.
He was watched by the Iron last season, who considered a move in the January transfer window as they looked to boost their firepower to try and stay in the Championship.
"Alan Pardew, my old boss, has done me a real favour and I was pleased that Stuart has chosen us ahead of several other clubs," said Martin Allen, the new Cheltenham Town boss.
"I've never liked him as he's always been a complete pain in the backside whenever playing for the opposition. Today I'll embrace him in Cheltenham, welcome him and let bygones be bygones.
"I'm still working, as I have been for the last couple of days, on the telephone to try and bring in one or two more players."