You can try the following. Make sure you have access to the Internet via Wi-Fi. Note: ALL DATA WILL BE ERASED FROM THE DEVICE.
1. Go to Settings - General - Reset and then select "Erase All Contents and Settings".
2. When the process is complete, you will be greeted with the Welcome screen.
3. Select the appropriate language and then enter your Wi-Fi credentials.
4. Do not restore from a backup when prompted. Just get to your home screen.
5. When you've gotten to the home screen, go to Settings - General - Software Update to check for an available iOS update. If available, select to update to the latest iOS version for your device.