The Massachusetts attorney general said the company had made errors that have potentially left students in debt far longer than they expected.