Greenland is part of the Kingdom of Denmark, but it's not part of the EU. It was originally part of the EU (back when it was the EEC) but voted to leave in a referendum in 1982, officially exiting in 1985. Today, Greenland has a special status called Overseas Country and Territory (OCT), meaning it has trade deals with the EU, but EU rules don't directly apply there.
He even threatened to invade a country that is part of the EU