That was the reason it was written, but as is wise when writing a piece of a constitution they used broad language so that ideals and concepts of fair treatment of individuals, and definitions of citizens would be used for future situations not yet contemplated.
If the had wanted to they could have used very narrow wording like is done in other amendments. They could have simply said that all former slaves are citizens. They did not, because they desired a framework for future situations such as we are facing now.
Compare the specific and narrow language of the 21 Amendment to the broad and defining language of the 14th. The writers of the 14th clearly intended it to be used in situations far beyond how we treat former slaves.