There is definitely some confusion about the intended meaning of this sentence. If a person wrote the wrong name, "John" instead of "Paul"; this has a very different meaning than if a person wrote the name incorrectly, "Jon" instead of "John". So, is the former the intended meaning and the latter? DL?
MattLangme: While you're correct that it's mainly used as an adjective I doubt any native speaker would use the adverbial form in a sentence like this: "I wrote the name wrongly" is not something anyone would say nor anyone hear. Colloquially it's as written: "I wrote the name wrong". Or "I wrote the name down wrong."
While that's true, it's also not what the sentence here says. If you're (still incorrectly) using "wrong" to function as an adverb, then the Italian sentence would also need it to function in that way. But in this sentence, "sbagliato" can only function as an adjective, and as such, it has to modify the noun, not the verb.
There are a few ways, but the way that keeps closest to this sentence would be, "Ho scritto sbagliatamente il nome." The "mente" ending can generally turn any adjective into an adverb.
You could also say "Ho scritto male il nome," but I believe that carries more of a connotation about your handwriting than it does about you spelling the name incorrectly.
In English you can definitely write 'the wrong name' (e.g. 'After getting married I wrote the wrong name on the census'/'I sent the text to the wrong name' etc etc.)
'A wrong name' sounds to me like you are saying there is something inherently 'wrong' (bad/evil) with the name itself (not the way it is written).