I hope you're having better luck. My ducks (2 Blue Swedish, KC, Pekin, White and Fawn Indian Runner) did the same thing once they found my pond. The first night was horrible. I was so stressed and called them every 30 minutes or so until my sister (who lives next door) sent me a text message at 3 am asking me to please shut up! Lol! (She was laughing about it but also trying to sleep) fortunately they all survived the night but I vowed I wouldn't chance it again.
My best bet is to get between them and the pond. When I first started doing it, I have my son go around to the side of the pen and hang out as inconspicuously as possible. Then, I'd bring out their treat bowl (they actually recognize the bowl I use for peas!) and call them. As soon as they were out of the water, Royce (my son) would quietly place himself between the ducks and the water. While they were devouring their treats, I'd move into place, also. Once they were done, we'd move on on them, corralling them into their pen. Now I'm able to do it without my sons as back-up. It's becoming more routine now and although they're skeptical at times, they can't resist their peas!
Tonight I did have a bit of trouble. I was about 30 minutes later than usual and the KC and Pekin didn't want to get out if the pond. I decided to divide and conquer. After getting the first three in, both parties were frantically calling out to each other. Within about a minute, the other two were coming up to the pen and went right in when I opened the door for them.
My pen isn't right by the water but I don't have to get them too far. I did have to block a passage that ran between their pen and my shed because they'd try to run around the pen back to the pond. The treats are a definite key to getting them out of the water, but, in the beginning of the ordeal, I did seize any opportunity I could to corral them a bit earlier in the evening. If I saw they were out of the pond and it wasn't too early, I'd go on and sneak around them and put them up for the night.
I considered keeping them penned like you did, but I was afraid that would make them hate it even more. In my opinion, I'd follow the suggestion of making it a "special" place where treats and such are! You want them to like their pen as much as possible. I noticed mine were fighting over who got to sleep in their water bowl each night so I put in an actual pond using the pond liners from Home Depot. Now they all can sleep in the water!
As far as just putting up the Pekins, I'd definitely pen as many as you could every night. If the mallards are totally resisting, protect the Pekins at least! I wish you and your ducks the very best!
Here they are penned up at night. You can kinda see at least the lighter colored ones!