I'd say, when in doubt, use the most direct translation, which is "er" → "he". Of course this is dependent on context, you could be talking about anything with a masculine article in German, a dog, or a tree or whatever, but in this case the question would also be, if the object isn't personified and therefore 'deserves' the "he". The other way around for example, if I said "es ist mein Leben", it is much more likely, almost certain, that I'm talking about a concept, than a person or any other object.
Since the Duolingo sentence has no context, I think it could go either way, but it depends on what 'er' is referring to. Let's say I really like a certain tree, I could say, "Ich liebe den Baum. Er ist mein Leben." If you think the context is more like, "I can do whatever I want! It's my life!" then "er" doesn't make sense, because it's sort of self-referential (my life is my life!) because Leben is neutral.