Did Napoleon invade Russia to give them no time to build an army?

No. His invasion was intended to punish them for not complying with the Continental System.