Mr. Moskos regularly advised policy makers, senators and generals on military matters, including coming up with the armed services’ “don’t ask, don’t tell” policy on gay personnel.