The idea of the U.S. acquiring Greenland has captured the president’s imagination, according to people familiar with the discussions, who said he has repeatedly expressed interest in the notion.