Your translation is OK but I think it can be improved.
来代替 sounds strange, because you didn't buy glasses and there is nothing to "replace".
but...instead is a very idiomatic English structure, and you can't translate it into Chinese directly.
I'd say 我想买的不是眼镜，而是隐形眼镜.
That's still weird since the Chinese word 隐形眼镜 sounds like a special case of 眼镜. It's better to say 我想买的不是带框的那种眼镜，而是隐形眼镜。
Unless you want to say "replace", don't translate that "instead" as 代替/替代/取代. In Chinese, one "but"(in this sentence: 而是) is enough.
Or you can see "but something instead" as a fixed group, translated as 而是.