I think at 17 you should be fine to hike it solo. But It really depends on your own skill, knowledge and experience levels of backpacking, and specifically in the high sierras. I think if YOU feel comfortable doing it, than you should be fine. And it can be lonely like others said, but it can also be a really "self-discovering" experience.
As for time of year...like others have said it depends on the snow pack, but in general I think that you would be good late JUne through early September. If you go early enough like end of June and beginning of July you will def hit some snow, and have some difficult stream crossings... BUT it will be cold enough that you wont have mosquitoes. ....As it warms up in the end of July and beginning of August the standing water from snow melt will start to hatch mosquitoes and that can become a huge annoyance! As you get into mid august through the beginning of September the weather is nice, mosquitoes will be dieing off and stream crossings will be easy. As you move into later September its going to begin to get colder and the chance of heavy snowstorms will increase.
For me I try to balance all those criteria along with trying to get good fishing conditions. The ealier you can get up there the better the fishing can be for the season, but I fricken HATE mosquitoes so I try and go while its still cold in late june/ early july...or try and wait till mid August.
As for doing it in 2 weeks...I think it is definitely possible, but in my opinion I like to take my sweet sweet time. Enjoy the aw inspiring scenery and terrain I am in. Amazing peaks, lakes, meadows, wildlife all of it. So I would opt to hike shorter days, even have a few lay over days at good spots to really enjoy my time in the wilderness and take it all in. If I wasnt restricted by time I would do it in like 3-4 weeks....really submerse yourself in the wilderness......but thats just me, I am more about being in the wilderness and outdoors, than pushing myself on the trail.
Have you considered incorporating the high sierra route into your trip for that section of the JMT??