It is good you are wishing for other things to do (at least sometimes :-) as making it a habit, it becomes a Habit, and then can be like other behavioral difficulties and be even more difficult to change as it reinforces your sexuality while alone (instead of helping you with your sexuality when with another) and could make all sorts of relationship difficulties.
I would substitute something for it some of the time. If you are alone and aren't particularly interested in doing an activity that one does when one is alone, call a friend or go somewhere that you can be with others and practice your communication/interaction skills. I'd see if there's a rec center near you that has pick-up ball games, for example, and wander there when you're alone and bored or join a study or other kind of group that meets occasionally.
Too, I'd think about how you feel about being alone, whether some of your masturbating is from anxiety/tension and if that's how you want to release it. The primitive parts of your brain will make that connection (anxiety/tension = release with masturbation) and it will become your "go to" release but you won't necessarily always be alone

That could make your life complicated. If you are alone because you are anxious around people, for example, I'd work on that anxiety so it doesn't seek the "easy" out, getting you stuck with it and making it even harder to interact with people. If you are anxious about being alone, in and of itself, do not have self confidence, I'd practice resisting the urge and putting it off, doing something "practical" (clean your room, take out the trash, do something to help your parents around the house :-) and/or distracting yourself with something that, when you "complete" it, will be something you can point to and use with yourself to help your self confidence (I got all my homework done and in bed for a good night's sleep by 10:30, something like that).