Judge Brett Kavanaugh was confirmed by the Senate to be an associate justice on the U.S. Supreme Court on Saturday, ending a monthslong battle that laid bare the political divisions of a polarized nation and a nomination stained by uncorroborated allegations of sexual misconduct.