I Am Legend scrapped its original ending because test audiences 'felt cheated' by the big twist
Discussion
(winteriscoming.net)
I think the movie made their ages much closer, if I'm not mistaken, but yes she is underaged in the comics and theres even a whole plot point where her dad doesn't approve of the situation. Still, in the comics it's clear that Scott isn't smart or heroic and the movie kind of has the opposite story.