Here's an article I wrote about an exercise you can perform. It's best to do it with a revolver but it can be done with a pistol too.
The phenomenon of "anticipating the recoil" or "flinching" as you fire, is due to reflex, nothing more. Reflexes can be taught and learned; just ask any karate guy. Way back in the day, when your ancestors and mine were settling disputes with rocks & sharpened sticks, we had some common enemies: the bear, the panther, the lion, the tiger... All of them did the same thing: they would ROAR and they would JUMP AT YOU. Your natural and unlearned response was to PUSH AWAY the attacker.
Nowadays, you have this dangerous tool in front of you, and you pull the trigger, and it ROARS, and it JUMPS AT YOU. Your response is to push it away! Here is a drill you can do to cure this. It helped me in one 1/2 hour range session.
If you have access to a large-bore revolver, one that will provide some fairly serious recoil, then do this: Load 5 loaded rounds, and 1 empty. Spin the cylinder & close it without looking at it. Line it up with the target & squeeze off 6 shots. When you hit the empty round, you will see your sights dip!
THIS part is important!
Another thing you will experience when you hit the empty cylinder is the 'tingling' in your arms that makes you push the gun away from you. It is a sort of "muscle memory." This is masked by the recoil, and you don't feel it when the gun fires. But it is this sensation you should be trying to avoid.
Now try loading the revolver with all empty brass. Align the revolver with the target and squeeze off a few “dry fire" shots. You will see your sights move & feel your arm tingle. Do this a few more times with the intent of keeping the sights on the target. Also, try to "follow through" with the shot: As you are dry-firing, pretend that the pistol is firing and recoiling. It looks and feels pretty silly, clicking and letting your muzzle raise and lower, but you are actually doing a little "muscle training" in the process. You are also training yourself to re-acquire the original sight picture.
When you've kept the sights aligned for about 20 "dry shots," go to the next step.
Now remove one empty casing from the cylinder. Replace the casing with a live round. Spin the cylinder & close it w/o looking at it, so you don't know when the live round comes around. Align, squeeze & shoot as above. When the live round comes around, you likely will be hitting right in the black, probably 8 or 9 or even 10 ring.