i'm only in my second year of highschool, but here's what i've been doing to try and keep my grades up!!
first I'd get any overdue projects done! how i stay on task while I'm working is that i do 20 minutes of work, then do 10 minutes of whatever i want, then repeat!
once you've turned in your overdue work, what i do is just study for future tests and/or work on projects that aren't due yet
Also try talking to your teachers to see how you can get your grades up!!
I know how much motivation it takes to do stuff like that, but you just need to find a way that works for you