Windows 8.1 should receive updates through January of 2023.
Windows 7 is scheduled to end updates January of 2020.
Windows Vista (April 2017) and XP (April 2014) are already no longer receiving updates.
If you are having trouble with Windows updates, make sure your hard drive has free space available. Reboot (Restart) your computer manually if you haven't. Windows 8 and up default to Hybrid Sleep when shut down.
Really you should consider upgrading to Windows 10 at this point. There is not much different between the two aside from a few cosmetic things. (And honestly a more functional start menu)