How to defend AES against chosen-plaintext attack?
TL;DR: AES is safe against plain-text attacks.

If :


you do not reuse your IV
your IV are random
you use a correct mode of operation (not ECB...)


Then you are safe against such attacks (you need at least these 3 conditions to be met).

On a side note, IV can be public, it is not a problem.

Worth reading:


Why is CBC with predictable IV considered insecure against chosen-plaintext attack?
Why is AES resistant to known-plaintext attacks?
What is the difference between known-plaintext attack and chosen-plaintext attack?