Yes, there is specialization in nursing.
If you decided to become a nurse for your career, could you specialize in something, such as pediatrics? If I were to specialize in pediatrics, would I only work in the pediatric and maternity wards?
Yes and no. As with most specialized Healthcare (or even your basic job), you may have to spend some time in the worst part of the job until you earn your right to get to the best part of the job.
In other words . . . Coming into a healthcare facility fresh from college may mean you work in the Emergency department in the graveyard shift until a spot opens up in the "Women's and Children's" Department. Heck you might even have to jump a couple of departments as you wait. For some, this can take years . . .
Just make sure you understand fully and that you embrace each job and role while you are in it.