The expression -(으)ㄴ/는/(으)ㄹ 줄 몰랐다 is used to end a clause stating something the speaker was not aware of or did not anticipate. -(으)ㄴ/는/(으)ㄹ 줄 알았다 on the other hand, is used to end a clause stating what the speaker had assumed to be the case; therefore, it expresses the speaker's realization that his or her assumption was incorrect.
Details
Examples
<span class="speaker-a">가:</span> 자야 씨, 왜 숙제 안 하셨어요?<br><br><span class="speaker-b">나:</span> 오늘 숙제가 있었어요? 저는 숙제가 있<span class='focus'>는 줄 몰랐어요</span>. 숙제가 없<span class='focus'>는 줄 알았어요</span>.
A: Jaya, why didn't you do your homework? B: Did we have homework for today? I didn't know we had homework. I thought we didn't have any.
<span class="speaker-a">가:</span> 은혜 씨 남편 보셨어요? 정말 멋있던데요.<br><br><span class="speaker-b">나:</span> 은혜 씨가 결혼을 했어요? 저는 은혜 씨가 결혼<span class='focus'>한 줄 몰랐어요</span>. 결혼 안 <span class='focus'>한 줄 알았어요</span>.
A: Did you see Eunhye's husband? He's really handsome. B: Did Eunhye get married? I didn't know she got married. I was under the impression she wasn't married.
앤디 씨가 오늘 학교에 <span class='focus'>온 줄 알았어요</span>. 학교에 오지 않<span class='focus'>은 줄 몰랐어요</span>.
I thought Andy came to school today. I didn't know he didn't come.