A massive iceberg that has been floating close to a village in Greenland and threatening its residents appears to be veering away from the coast, toward the north, officials said.