The judge declared Tuesday morning that O'Ryan was insane at the time of the crime. The 36-year-old, who has been in custody since his arrest on March 23, 2009, was given credit for 954 days served.
Two psychiatrists who examined O'Ryan while he has been jailed testified that they believed he suffered from a major mental disorder -- likely schizophrenia.
O'Ryan tried to meet Johnson at the studio where she was taping "Dancing With the Stars". At the time of his arrest, LAPD officers said they found two guns, a knife, a bulletproof vest in his car, as well as a note for the gymnast and several pictures of her.
On June 11, after a four-day non-jury trial, O'Ryan was convicted of one felony count each of stalking and commercial burglary, along with two misdemeanor counts of carrying a loaded firearm in his vehicle within the city limits.
The 18-year-old gymnast testified that she canceled public appearances and limited her movements after O'Ryan was arrested.
City News Service contributed to this report.