The Senate voted Thursday to confirm Robert F. Kennedy Jr. as secretary of the Department of Health and Human Services.