Biden’s Pentagon nominee pledges to rid ranks of ‘racists and extremists’