Randy, . . .
It is all, . . . absolutely all, . . . muscle memory.
Like the old saying goes, practice makes perfect, . . . well, . . . it does.
You have obviously spent some serious time shooting a rifle to get where you are, . . . put an equivalent time into the pistol, . . . and it will happen.
Serious time spent dry firing will help, . . . as well as time spent with a .22 instead of a bigger bore.
Keep at it. AND, . . . every range session, keep your best target. If you only shoot silhouettes or something like that, . . . make up some 4 inch black circles on your computer printer on 8 1/2 x 11 paper. Shoot 10 rounds at it just before you leave. Keep them and after you have a stack of 10 or so (all dated of course), . . . compare them.
You will be seeing the group size come down.
May God bless,
If you can breathe, . . . thank God!
If you can read, . . . thank a teacher!
If you are reading this in English, . . . thank a Veteran!