He’s a close friend of 3 years. I’ve liked him since the beginning. I’ve always been there for him whenever he’s down and spoken to him about stuff he’s interested in but he rarely does the same . But he does flirt with me , and has said he wants to marry me in the future if he doesn’t marry by a certain age . Doesn’t he care?
By telling you that he wants to marry you in the future if he doesn’t marry by a certain age, he is indicating that he would only marry you if you were the only romantic option that he had left.
He has repeatedly not shown interest in what you like because he doesn’t care for you in the same way that you care for him.
He does flirt with you because he knows that it will keep you hoping that romance could ensue between the both of you at some point. This ensures that he always has you as a romantic option.
However, again, if he were ever to exercise that romantic option, it would only be because he has been unable to find someone else that he would much rather be with.