Yes, they both mean “Before fact X was just confirmed, I already believed or suspected that fact X was true.” but “I knew it” sometimes (depending on context) can imply a greater level of certainty (about the pre-confirmation belief or suspicion) than “I thought so.”