James Cook University will build a new student accommodation facility after the previous one caught on fire.