Yes, that is true. Potential energy is lowest in the solid phase (where molecules are closest together) and highest in the gas phase (where they are furthest apart).
Any time a substance goes through a change of phase, the potential energy of the molecules is changing while the kinetic energy remains constant. If the substance is not going through a phase change, but is being heated, the heat flowing into the substance raises the kinetic energy of the molecules (as reflected by the rise in temperature) while the potential energy remains constant (since the molecules are not changing phase).