It is not change of a person alone that constitutes sin, because we also change toward God, rather than away from Him. In my understanding, this teaching on killing another person is LESS about YOU, because you were faced with a horrible decision--the teaching is about the person who DIED, in recognition that they were one of God's children, that death was not the intended fate for any of us, and that causing the death of another is a horrific action that happen sometimes in our fallen world, where we are often faced with 2 choices that both have bad consequences.
God, in His great mercy and wisdom, can take the horrific decisions we make in this world and use them to shape us for good. If we have killed someone, in order to shape us for the good and prevent us from falling away from God, we spend time in mourning for our actions, even if there was no other option. Mothers who have tubal pregnancies have to have the baby removed lest their tubes burst and they both die. It results in death, and there is no other option. They are not guilty of sin, but you better believe they're going to mourn that little baby and pray for this fallen world that can allow situations such as this.