If you are arguing that a molecule has an actual preference for life over death you are arguing for panpsychism or something similar.
The basics are:
Natural selection favours traits that promote successful reproduction (asa simple consequence of the fact that they do promote successful reproduction)
Survival usually helps promote successful reproduction.
As organisms become more complex, more complex behaviour becomes possible.
Even single-celled life is capable of some - unthinking - reactions to their environment. Reactions that promote survival, will tend to be favoured. The more complex the life, the more options there are to elaborate on such behaviour - more and improved senses, more and improved processing of sensory date, more possible actions.
Life that reaches the stage of being able to have preferences will have inherited such behaviour - it will be hard-wired into their nervous system. The ability to consider actions in more detail - thinking about them rather than automatically reacting - would be an advantage. But still it would be necessary for the thinking to be directed in a way beneficial to reproductive success, hence a preference for survival. Very likely this would be based on the older hard-wiring of the nervous system, since it is both available and works in the right direction.