As a high school student, what courses qualify for possible credit depends on the laws and rules in your part of the world. You didn’t mention where you are, so we don’t know.
In the US, each state sets its own minimum standards, and each school can choose to set even higher standards, so you have to go through your school counselors to get permission for what you want to do, if you want to earn high school credit for it.
Also, the college that you apply to will also have standards that you must meet to satisfy their entrance requirements. So you need to check that part of it too.
Remember, schools can’t give you credit for effort, or for what you claim to know, but only for what you can prove you know.
For high school students, there is the SAT Subject Exam in Japanese, which is open to anyone with a strong knowledge of the language, regardless of how or where you learned it.
But you have to check with your high school and college to see if they will grant credit for a passing grade, or recognize it as fulfilling a college admission requirement.
And there is a very good Japanese distance learning video series for high school or college level Japanese that could help you prepare for the SAT exam. It also has textbooks and workbooks available to go with the videos.
And a Memrise user has put together a very good roadmap of resources for learning Japanese on your own.
And this is another self-paced online Japanese language program for beginners, created by a qualified native Japanese teacher.
But remember that language learning requires a lot of practice listening and speaking, reading and writing, making mistakes, and being corrected. So there is much more to it than just going through a series of flashcard based exercises.