A petition for writ of mandate is a request for a higher court to tell a lower court what to do.
It will not help with your situation.
You are required to register as a sex offender under Penal Code 290 because you were convicted of attempting to commit a lewd act with a child under 14, as described in Penal Code 288(a). (Penal Code 664 means it was an attempt, not a completed act of child molestation.)
Due to the decision in People v. Hofsheier (2006) 37 Cal.4th 1185, people convicted of certain offenses can file a petition for writ of mandate to remove the requirement for sex offender registration.
Unfortunately, your offense is not one where registration may be striken.