I have had chickens that came when I whistled.
What worked for me:
bring out some food they like, whistle, give them the food.
They learned that whistle = food.
For the food, sometimes it was scraps from the kitchen, but sometimes it was just their normal chicken food with water added. I don't know why chicken food would taste better when wet, but they sure seem to think it does!
If I would whistle and not have food, they learned very quickly to ignore it.
I think sometimes they would hear the whistle, look to see if the food was really there, and then come if they saw the food. (Hmm, maybe that was smart of them?)
If I wanted them inside their pen, I would sit the food in the pen. Something like bread crust does not work well, because the first chicken picks it up and runs back out, and all the other chickens follow

They cannot carry wet chicken food, so they have to stay there to eat it, which gives enough time for the slowpokes to come in and me to shut the door. Wet chicken food quickly became my favorite bribe for luring chickens into pens