Yes you can go to jail for impersonating a soldier when you've never actually been a soldier or in the military at all.
An act of 2005 made it illegal to impersonate a solider and if caught you will be arrested and can serve at least 6 months in jail.
Impersonating a solider became illegal because of the Stolen Valor Act of 2005 which is a law that made it a federal misdemeanor to falsely represent oneself as having received any U.S. military decoration or medal.
If you're convicted of doing so and impersonating a solider you can be imprisoned for up to six months, unless the decoration lied about is the Medal of Honor, in which case imprisonment is for at least a year.
So you should never impersonate a soldier because it's not a good thing to do and it's not worth the jail time or fines either.