If Oswald genuinely had been motivated by a desire to get his name in the history books, he could be expected to boast about his crime rather than repeatedly deny that he was responsible. Perhaps he changed his mind after he was arrested.
Source: Why Did Lee Harvey Oswald Deny Shooting President Kennedy?