I would suggest starting your dog out in a pool or shallow lake where you can enter the water with your dog. Many dogs will be more confident if you are standing with them if they are nervous about venturing out on their own. So by walking out, you can build their confidence before letting them go on their own. Bring a favorite toy with you and encourage them out further by tossing the toy short distances and swimming over to it.
Bring another dog who knows how to swim along to help encourage your pet to try.
There are life vests (life jackets) you can purchase to aide in teaching your dog. These usually have handles that you can hold onto easily and are helpful for getting a dog back into a boat.
Here is a common problem. Your pup goes off and won’t come back. You have two choices, swim out and get them, or wait until they get tired and come back. Never let them off leash and away from you until you know for a fact they will return or start in shallow water where you can go get them should you need to.
I use a two toy approach to retrieving and swimming. I always keep one close by so I can toss it near me. Try to make a lot of noise to get their attention and toss it into the shallow water. Tennis balls are not the best choice as they can get lodged in the throat blocking the airway. I really like kong retrieving toys or retrieving bumpers.