@Samboi12,
Maybe he no longer finds you attractive, and is saying he's straight to avoid hurting your feelings. Or, he found that he's more interested in women, or any other man beside you. Leave him alone. Having a semi-relationship when you're 17 doesn't been the two of you are bound together forever. It doesn't matter if you are homosexual or heterosexual or just same sex best friends. Things that happen when you are 17 are long forgotten when you are 30 and becomes dimmer after that.
I don't know if you have been to a high school or college reunion yet, but a lot of folks seem to be stuck at age 17. This isn't true for all people, but it's disappointing when you run into it as you get older. Things change, get used to it.