Okay I didn't exactly know that we're dealing with a high school problem. In that case, yes, I agree with Gza about the math in E/M. So yes, you have the answer here. Griffiths is perhaps the best intro E/M book by the way and this problem is treated there so you might like to have a look at the diagram and the final equation just to satisfy your curiosity about the nature of the field, if you wish to.
To help you avoid doing that right now (sometimes reading an advanced book without much background can be dangerous), here's the blurb of it: when you computed the B = \mu_{0}nI you made a major assumption to simplify the closed integral that is the meat of Ampere's Law--that the magnetic field is parallel to a line parallel to the axis of the solenoid in the interior and is zero immediately outside the solenoid. Also you neglected the wavy nature of the field outside the solenoid and at the ends (in advanced E/M you will have to take care of these factors and they become more serious in realworld applications). By the time you exhausted these assumptions, you ended up with a linear-looking integral which you could solve with another assumption which is critical to classical E/M: Symmetry.
You can think of the non-idealities of a real life solenoid now:
(a) no matter how hard you try you cannot possibly have infinitesimally small distance between successive turns, i.e--an ideal close packing is impossible.
(b) due to (a) and otherwise, the field is not exactly parallel to the axis of the solenoid...a better idea may be obtained by drawing flux lines which are curved...
(c) just outside the solenoid the field just can't be zero as the turns of the coil will behave as infinite packets of rotating charge infinitesimally spaced so that each sets up a complicated magnetic field vector that may even be time variant owing to the resistive dissipation of the coil's material leading to nonlinear time varying currents (by this time you're probably thinking: man, this is hard! Read further)
There are other factors too but the gurus of physics at schools (the teachers and the syllabi framers) have kept the excitement in a box called E/M theory to be taught to you when you're a freshman and have done a consistent level of mathematics to understand the ease of the equations which come up during the consideration of the factors above.
Just to add to that...introductory physics is good because even though it is full of incorrect assumptions (and therefore equations like these), it makes you rethink about them so that you are (optimally) well prepared to understand the things you read in high school in a better fashion to improve your attempts at considering factors which did not make hell of a difference in school :-D.
Enjoy physics...
Cheers
Vivek