Army Pfc. Naser Jason Abdo received the punishment Friday in Waco.
Abdo told authorities he planned to make bombs as part of a "massive attack" against Fort Hood soldiers last year. He was convicted in May on six federal charges, including attempting to use a weapon of mass destruction.
The 22-year-old represented himself at the sentencing.
Abdo was AWOL from Fort Campbell, Ky., when he was arrested with bomb-making materials last summer at a Fort Hood-area motel.