Thermal energy depends not only on the temperature of a substance but also on the amount of it.
It may be helpful to think of this situation as looking for the total amount of molecular movement. The pot of boiling water has a lot of movement but only a few molecules. The iceberg has far less movement between molecules but vastly more of them.
With the size alone, the slight movements between the molecules of the iceberg add up immensely and tower over that same measurement on the pot of boiling water.