You'll want to use a text object attached to your enemy sprite in a container.
When you type, you'll be able to compare the player input to the contents of the text object to pick the matching text object. If that text object is in a container with the enemy sprite, the correct enemy will also be picked. From there you have the proper target picked and you can do whatever you want with it, including get its position or destroying it.
I'm playing around with it and I don't think I have it quite right. So I make a New Text Object and make the text within it the code, then add it to the container of the specific enemy I want, but then how do I tie that to the Text Input Box?
Another thing that I am trying to figure out is how to remove the text inside of the text input box after a bullet has been fired. Right now, it just shoots rapidly until it does not match the desired text.