The reason why you probably can't get Castform because of its rarity.
The only place where you can catch a Castform is on Route 6, but it is only available in a Shaking Grass. Even then, the chances of encountering a Castform is rare. Most of the time you will get an Audino / Dunsparce / Emolga or (on rarer occassions) an Azumarill!It isn't exactly impossible to get a Castform, but don't expect to get one so quickly.
Hope I helped! And good luck on catching Castform!
Sources: Route 6 , Castform DB Page