I just had to retrain mine, because I built a new coop a whopping 20 feet away from their old coop, then lodged the six "adolescent" chicks in their old coop. At first, they tried to get into their old coop, then they gathered in a group on TOP of it (it's a low, "kit" coop) and peered in through the little window at the kids inside.
I had to hand carry 9 chickens, one by one, from the old coop, to the gate in the run, through that gate, close it behind me, down the path to the people door end of the new coop, open the door, put the chicken inside, and repeat the process for the other 8.
For two nights.
On the third night, everybody decided they didn't like being carried around like that again, and they put themselves in at night..... the new coop has an automatic door, and they all made it through it before it closed. I had the sensitivity set so it closed about 20 minutes after the last chicken put herself in, in the old coop; I wanted to make sure it didn't close too soon.
One girl - the usual one who was last to go to bed - DID miss her opportunity the third night they were doing it right. She spent the night UNDER the coop, surrounded by the hardware cloth on 3 sides, back far enough so I couldn't reach in to get her. The next night, she didn't make that mistake.