To earn something is to work for it. Earning something doesn't come for free.
I loved that movie. Cpt. Miller meant for James to "work for" his life. To earn his life at the cost of the lives of others. The life that Cpt. Miller and all of his comrades died for. That's why at the end of the movie, he asks his wife: "Tell me I'm a good man, tell me I've lived a good life." Cpt. Miller wanted Pvt. Ryan to not waste his life that others had paid for.