U.S. stocks closed mixed on Thursday, with the health care sector posting strong gains.