My name is Dana and it's a boys and girls name, so even if River is used for a girl so what! There are lots of unisex names. I've only known boy's named River.
Also, I think people can be so rude cuz they would NEVER say that (to your face) after your baby is born but they think it's okay to say while your still preggers. They see babies in utero as abstract and don't even realize that once you have a name picked out, that THAT is the baby inside and will be the baby outside. It's why I don't bother announcing our name until the baby is born.
If this person who said that is family or close to you I would just say "I'll make sure to let River know what his aunt/uncle/grandpa/etc think of his name after he's born."
I also just read some research talking about how people prior to 1950's would all want their kids to be names that were common and easy to spell so they "fit in" (so like the top 10 boys names made up a huge percentage of the names...like 5% of the kids were named John....so you'd have 1-3 John's in your class of 30 kids) and nowadays people want their kids to stand out, be individuals, not blend in sheeple etc (so the top 10 names only make up a small percentage now...Jacob only being like 1% of the names even though it's #1...so you'd have 1 Jacob in 3-4 classes of 30 kids). So if this person who commented is older, they may have that belief that kids should blend in and you can hold in your heart that you don't have that belief and so you don't need to take their comment seriously.