Index of refraction is an intensive property of a material. In a homogeneous material it doesn't depend on the amount of material or the shape you arrange the material into.
Note that the glass in optical fiber is not homogeneous. The composition varies radially, with higher dopant cocentration (and thus higher index of refraction) near the centerline of the fiber, and lower index away from the centerline. The variation might be step-like (a uniform core surrounded by a uniform lower-index cladding) as in most single-mode fibers; or it might be continuous (ideally, a parabolic shape) as in high-performance multi-mode fibers.
Also, index of refraction is a macroscopic property. It's the effect of many many atoms interacting with the light beam travelling through the material. If you look at the glass on a scale where individual atoms are relevant, you'd no longer see the glass as having a uniform effect on the light's propagation velocity. (This is similar to how a current in a river is the macroscopic view of vast numbers of water molecules travelling in mostly random directions which only happen be slightly biased toward travel in the direction of current flow).
One thing that might have confused you is that optical path length does depend on the index of refraction of the material the light is travelling through. Optical path length is the length of vacuum a light beam would have had to travel through to have the same phase advancement as it had travelling through some material. So if a beam travels through 1 cm of glass with index 1.5, then the optical path length is 1.5 cm. If it travels through 1 cm of glass with index 1.6, then the optical path length is 1.6 cm. This is because the optical path length depends on the index, not because the index depends on the dimensions of the piece of glass.