Predator attacks are unacceptable to me, so I lock my ducks inside at night. I feel like if predators can see them outside at night they will be more likely to try to dig under their aviary to try to get at them. I have a skirt, but I don't want to test my luck.
So, into the barn. Initially I gently herded my ducks and said, "go to bed." Then I gave them a bedtime mealworm snack as reward once they were inside. It took a few months, since a few were very shy, to get them trained. But then one in particular would go to the doorway near bedtime and call for everyone to hurry up and come to bed! She was very serious about bedtime.
After they were trained and knew they would get a bedtime snack they almost always eagerly went to bed at bedtime. Either by themselves, and I would find them inside quacking loudly for me to hurry up with their reward, or when I told them to. Occasionally one duck will be feeling rebellious and refuse to leave the pool. In that case I wiggle my fingers at her and tell her to go to bed and she does, that's all the herding required now.
Another way I can easily get my ducks to go to bed is by going into the barn, calling them, giving them mealworms, and leaving before they finish and have a chance to follow me out.
If I don't close the door after my ducks go in, they will go right back out.
My ducks also have ramps and steps. I have heard of ducks feeling nervous about these things, but mine adjusted quickly.