We can apply Kant's categorical imperative to lots of stuff. Some people don't want to have children. If everyone chose to not have children the human race would face extinction.
This does not imply that we must (or more importantly, can from a moral perspective) force people who do not want children to have them anymore that it implies that forcing people who do not want flu shots is the right thing to do.