40 miles per week is just fine for your age. Assuming you are a freshman in high school, bumping 10 miles per week for the next few years would put you at 70 miles per week as a senior. That is perfect.
Now, for racing, focus on the high school distances. 5k and under. You can move up to the 10k after high school. Maybe run/race one for fun in the off season, but don't specifically train for it and don"t take it too seriously.
Do you have a coach? I'm not the type to say "just do whatever your coach says." My coaches tried to keep my mileage down because they said it would burn me out. I said screw them and did 70 mpw my senior year anyways. Broke through that year. Now in my mid 20s and putting in 100+ miles per week, still setting personal bests all the time. So don't listen to those who say your mileage is too high. It's really not.
If you don't have a coach for some reason, I would recommend getting one who actually understands how to develop athletes. Not just a local hobby jogger. An actual coach with results. Good luck!