Unfortunately, there is NO way to retrieve that passcode if you don't remember it. And don't turn off your iPhone. If you turn off, you will not be able to access the iPhone even with the Touch ID unless you put in the passcode for first time after turning it on.
There is a way to update your iPhone using your computer without the passcode, but the problem is, after your update the iPhone it will ask you to enter the passcode and if you don't provide the correct passcode, you will be locked out.
So your only option to completely solve this problem is, restore the iPhone to factory settings and setup it as new iPhone. This will erase everything from the iPhone. This is how Apple designed it to protect the information of their users. But since you can access the iPhone, you can backup all your photos, documents etc to your computer before restoring it.
Follow the steps below to restore and update a fresh version of latest iOS on your iPhone.
First download and install latest iTunes on your computer from here : https://www.apple.com/itunes/download/
Then connect the iPhone to your computer with the USB Cable.
Open Computer or This PC and you will see your iPhone there. Open it and open the sub folders and you will see your pictures/videos taken on your iPhone. Then copy them to your computer.
If you have synced the contacts, notes etc to iCloud, they will be restored back if you sign in using your same Apple ID/iCloud ID. To check if the iCloud sync is on, on your iPhone go to Settings > iCloud and make sure all the options are turned on. Then turn off "Find My iPhone" option from there.
Once you did that, open iTunes application on your computer.
Select your iPhone in iTunes at the top left (click iPhone icon).
Under Summary section, click "Backup Now" button and make sure "To this computer" is selected.
Now, lets restore and update a fresh iOS 9 version.
On your iPhone press and hold the Home button and the Power button at the same time for 10 seconds or until your iTunes shows a message telling you that it has detected an iPhone in recovery mode.
Click Restore or Restore and Update button. This will install a fresh version. After restoring you will get a option to setup as new iPhone or restore from backup. If you restore from backup, old passcode will be restored back. So you don't want to do that. So setup it as new iPhone.
Note : Put it to recovery mode while connected to computer and also in recovery mode your iPhone will show USB cable pointing to iTunes logo. And it will take a while to restore it.
Please let me know if that didn't work, so I will continue to help you until we fix the problem.