Yeah I had a similar experience. I was fighting the Kongo (who admittedly were pretty strong) and brought in two others, including the Nubians, and they could do absolutely nothing. But when it comes to city states, AIs seem to get their act together. It's almost like AI invaders have two modes: one where they just get to the city and hammer away at it, and one where they randomly move their units around while succumbing to range/city strikes. Honestly I think they just need to remove range from the game entirely (except for airplanes and some artillery).