When I first started swimming real freestyle it was as an adult too. When I started to add more volume to my swim training I got shoulder pain too. I think it was a rotator cuff issue. I believe this was probably as I was swimming very flat without much body rotation which caused me to recover my arm in such a way it cause enormous stress on my shoulder joint.
As I recall it took a long time, several months, to really recover. I would still swim periodically and would just take a few days off once I felt any discomfort again.
After a while of swimming learning more about technique (I think this was the time I found TI) it eventually recovered and I haven't had any issues since.
Next time you go swimming you could try what's called a straight arm recovery over the top of the water instead of a high elbow. If this causes far less stress it's definitely that your shoulder is trying to operate outside it's range of motion with a high elbow recovery and you could probably benefit from more body rotation.
If you've had a swim coach telling you to 'make yourself taller in the water' or 'longer' you may also be overreaching as you place your hand out in front of you which can cause problems too as that can cause a tendancy to push down on the water loading the shoulder joint in a way it's really not 'designed' to have load.
TI has some fantastic drills that can probably solve many of these issues in only a few trips to the pool. See what materials you can find online and when you realise how great it is you might like to then purchase an updated book or video tutorial.
I've made a few assumptions in my post but I hope this helps.