Brett Kavanaugh, a federal appeals-court judge, was nominated to replace the retiring Justice Anthony Kennedy.