the internet is full of good work out programms. just google it! Of course proper nutrition will help too. To make a long story short: less carbs, less sugar and you're good! It's really not that difficult but you have to be disciplined and work out consistently.
I have long held the best way to get into basketball shape is to play, as Kizzle said. It's a really weird game in what it asks, change of direction, a ton of sprinting, more jumping than really any other sport outside of maybe volleyball. So there is an element of playing sometime being too much.
I always trail ran. The uneven ground is good for balance, shifting directions, and other assorted movements that I always felt help. That and hills were my go to for general exercise.
And in the gym, I give this advice a lot, but the most overlooked excercise for the game specifically is forearm curls and extensions. Everyone does the calf raises, which are sort of the lower leg equivalent, because it's the answer for jumping quicker and changing direction, but the forearms will put more snap in your handle, have a HUGE impact on your range and the quickness of your release, and will help you on the defensive end with the brief moments of illegal hand checking. It's just that it's an excercise that looks rediculous and unless you're working out at a body building type level can generally be skipped for physical appearance type working out.
And I'm 37 and have had four knee surgeries and both achilles surgically reattached in the last year, so take that for what it's worth.
What better way to get into basketball shape than playing the game itself.
Bingo. Doing all that jogging and treadmill work certainly doesn't hurt, but even eating right and doing that isn't going to replicate the kind of cardio you put yourself through on the court. The constant high-intensity motion, hard cutting, random burst of all-out hustle, etc. just isn't the same as pacing yourself through a few miles around the block.
Play as much ball as possible, and don't coast. Go Avery Bradley on them fools in pickup ball, that's how you get in shape. And not only is that the best way to get in the condition you want, it is also the best way to work on your skills - in game situations.
being real here, if you are not playing pro ball, imo working out and eating a lot is enough. obviously dont stuff yourself with junk food, but its not really necessary to go on a bodybuilding diet. Unless of course you want to look cut as ****.
gotta eat a lot of green veggies. you should also learn to love lentils, chickpeas, beans, anything thing high in both fibre and protein.
I'm guessing you're in high school, if that's the case, if you eat like this say 5 out of 7 days a week you will have a significant benefit over your peers who are likely not gonna be eating the same foods (i know i didnt in high school)