Dry fire practice and sub-caliber (.22LR) practice will cure you. If you continue to shoot lots of full power ammo without overcoming this issue, you will just make it more permanent and difficult to overcome in the future.
Don't worry, you are not alone. Flinching is near-universal amongst practical pistol shooters, and few can truly say they have eliminated it completely. The same is true for most shotgunners. With the AR15 the problem is less common due to the mild recoil, but it still happens.