The way to train a dog, especially a pup, is by repeated, daily exposure while under your direct control. Pups, or adult dogs new to chickens, should never be allowed access to the birds when not on a leash. You have an advantage in that your dog is young. Ideally training would have been taking place from the day the pup came home. I raise dependable ranch dogs by simply taking them along with me every day when I do barn chores in addition to teaching the usual obedience commands of come, sit, stay etc.. Pup is attached to my by it's leash and goes right along with me into pens and coops etc. That way I can immediately stop and discourage inappropriate behavior. This is accomplished by a sharp tug on the leash and a firm NO. This goes on every day. Eventually all this becomes old news to the pup, chickens become a boring, every day thing. When I see the dogs interest in birds waning it eventually gets to trot along with me off it's leash. But only when I know it has a rock solid recall, even in the face of great temptation.
This all may sound like a lot of work, and guess what? It is! And it can go on for a long time, just depends on the dog and it's temperment. Dogs are pups until they are a year and a half or two years old, even longer for really large breeds. Training has to consistently going on every single day. But the effort put into raising a pup this way pays off many times over in the years to come in the form of a truely good ranch dog who does NOT slaughter your flock the moment you turn your back.
There is a caveat to all this: Not every single dog can be trained to be trustworthy around chickens. Some just do not have the right temperment no matter how much you train them. If you never reach that spot in training, even months down the line, where you see the dog start loosing the intense interest in the birds, if he just continues to fixate on them intensely and completely tunes you out in those moments, that dog is probably not ever going to be trustworthy.