Had to force the setting for iMessage on, on an iPhone 5s (replacement) when it quit working similarly to your situation on an iPhone 5S with latest version of iOS.
We were about to call Support but found the problem it started happening over a week ago to some phones that were clearly iMessage capable. ! It seemed flaky at the time but became permanent. It was definitely sending only SMS to iMessage capable devices. Apparently got stuck and it finally became permanently broke. We tried complete (cold) restart, turning off iMessage, new thread which worked to another user but not to everyone.
To fix it (here’s the weird part to me...) we had to turn OFF the SMS switch (Settings>Messages>Send as SMS= OFF) and send a text. Afterwards it was forced back on to iMessage (which was turned on and off to no effect previously), it began working for texting in iMessage.
Once iMessage worked, restoring the SMS switch didn’t change the situation and it was back to sending iMessages to iDevices as normal. I think that the phone had the latest iOS release, etc. We tried everything we could think of when it started happening and I told her it wasn’t right earlier.
The last straw was on Mac CPU, sending messages using the iPhone refused to work on various threads, of course those were SMS threads. There’s a hint...