Extant Greek manuscripts (old documents available) used to translate the verses Matthew 2:2-3 are either written entirely in CAPITAL LETTERS or entirely in lower case letters.
The translators chose therefore what to capitalise (e.g. names, titles etc) when performing the task of translation.
In the KJV, Matthew 2:2-3 reads;
2 Saying, Where is he that is born King of the Jews? for we have seen his star in the east, and are come to worship him.
3 When Herod the king had heard these things, he was troubled, and all Jerusalem with him.
The NIV reads;
2 and asked, ‘Where is the one who has been born king of the Jews? We saw his star when it rose and have come to worship him.’
3 When King Herod heard this he was disturbed, and all Jerusalem with him.
The translators, when translating both the KJV and NIV used the same Greek manuscripts to perform their task. The translators chose what to capitalise and what not to. It is obvious the KJV translators gave reverence to our Saviour the Lord Jesus Christ, but the NIV translators would prefer to give that honour to Herod!