The 21-year-old returns to Sixfields for a second time after being recalled by his parent club two weeks ago.
"We're delighted to have John back," said Cobblers boss Chris Wilder.
"He gives us a physical presence at the top of the pitch and we were disappointed when he had to go back to play in the Championship."
That physical presence nearly came from Bayo Akinfenwa but Gillingham reportedly turned down a move for the big striker which would have seen him enjoy a third spell at Sixfields.