There's nothing wrong with it unless maturity is a concern. High school tends to be a point where people begin to mature and you can really see that difference between a freshman and a senior. A sophomore still has a little to go before they have a good level of maturity imo, but that also depends on the person too. Age-wise, a two year gap is barely anything.
While you're in high school, its not the age gap that makes it weird, its the maturity gap in most cases. Once you/whoever you're referring to is in their mid-ish 20s, dating someone 2, 3, 4 ect. years older/younger than you is normal.
When I was a senior, we used to date freshman and sophomores. More specifically, we would try to bang them. As long as you weren't 18, it was all kosher