To be fair, as far as Bran knows Jon isn’t a Targaryen. He only knows who his parents are and that he was born in Dorne, so he’s Jon Sand. Not Jon Snow. Yet still a bastard.
The only way he would be a Targaryen would be if Rhaegar and Lyanna had wed, which I’m sure they did and Sam/Gilly are going to find proof of that at the Citadel.