K. T. McFarland, the former Fox News commentator appointed by President Trump as deputy national security adviser, is expected to leave that position soon and may be nominated to be the United States ambassador to Singapore, according to officials briefed on the matter.