I think the analogy does work because you have a familiar relationship with the person, and in this scenario they would need your kidney aka your personal resource and no one else’s, to sustain their life. Also I’m a bit lost by what you mean by “hurt” because for all we know the fetus can’t feel anything. It can’t hurt or even feel happy, it is just nothingness. If you mean hurt in the sense that you are preventing it from deploying a future conscious experience, then I understand what you mean.
I have heard this “stranded mother” argument before, and I dont think its the gray area everyone makes it out to be, it branches into two scenarios. 1, if the mother willingly chose to have that baby, its obviously not morally permissible for her to deny that baby her own resources, to help it live. Because once again, she chose to have it so she must take care of it. 2. If that mother was forced to have that child, it’s not entitled to using her bodily resources. So no she should not be forced.