Separate him from the rest of the flock, keep him warm enough, with fresh water and food in a clean pen.
Here is what Storey's Guide to Raising Ducks, First Edition says:
Ducks with phallus prostration should be immediately isolated in a clean pen to prevent other ducks from damaging the penis by nipping it. If the bird is valuable and his problem is discovered before the penis has become infected or dried out, recovery is possible. The organ should be washed with clean, warm water and then disinfected and treated with a medicated ointment. You can try pushing the penis back into place, but - as often as not - it will pop back out in a short time. Apply the ointment daily until he is fully recovered, which may require several weeks or longer. Drakes should not be allowed to mate for at least 3 months.
Often, the end of the penis dried up and falls off. Because the semen exits from the base and travels down a groove that spirals around the penis, ia drake can still be fertile even if a portion of the penis sloughs off (although fertility usually does not return for 6 to 12 months).