Iphone 4 won't update past a 7.1.2
The latest iOS version supported by iPhone 4 is 7.1.2. There is no official way to install iOS 8 or newer on older iDevices.

You can find a compatability list on Wikipedia.