Bran is also not an idiot. He sees his aunt at the end of the war with a baby and see his father about to take that baby. He knows Jon came home with his father after the war. He is smart enough to connect the dots to Jon Snow. The look of shock can just as much be about “oh shit so ... Jon’s a Targaryen” as anything.