That sounds like a bug. I didn't use this spell much, but you have to click each target you want to heal (and I think I successfully healed green allies as well as party members), then if you didn't select the maximum number you have to click the tick icon. The most obvious problem if it's not a bug is that you've got an enemy right next to the ally and it's picking them up instead of the ally you're clicking on. Try moving the camera around, sometimes it can be difficult to select who you want to. Otherwise it does sound like a bug.
Mostly I used mass healing word in combat. It's weaker, but based just on a radius from the caster and only requires a bonus action.
It must have been, because it's been working fine in subsequent encounters I've had. It was odd because in that one situation I was unable to successfully select party members or allies to get the "green check" to cast the spell.