Sex with someone i didn't know about

The title of this probz makes me sound phsyco, just dont know how to feel on the situation im in right now, me and my boyfriend have been together almost 2 years now , i told him when we first had sex he was my first because obviously , he was and it meant so so much, but suddenly tonight he's told me i actually WASNT his first even tho thats what he said i was so idk whether im being silly getting all funny and upset or what , just feel like ive put so much hope into know we were both taking a big jump and now it seems one sided all of a sudden and i dont know why he lied in the first place?