Yes!, your answer is correct.
Heat flows from higher energy atoms/molecules to lower energy atoms until the total energy is distributed roughly equally across all atoms/molecules and the system reaches equilibrium.