Question:
Is biah with a Niddah one of the transgressions that one cannot commit even when one’s life is in danger?
Answer:
Yes, it is forbidden for a man to have biah with a nida even if his life will be in danger. In fact not only to have biah but even kissing or hugging a nida is forbidden even if one is faced with a threat of death. The rule is that anything that is an biblically prohibited relation or act would be included in this. A single girl is assumed to be a nida from about age 12.
For a woman that is in such a situation, if she is not going to do any action and will remain passive, it would not be as strict, and it isn’t yehareg v’al y’avor.
Sources:
Y:D 157-1, Shach ibid 10, Chayei Adam 21-13