It's actually exceedingly difficult. The family registry, koseki, is steeped in a thousand years of tradition. You can't simply walk into the nearest city ward office and fill out a form.
There are also restrictions on the kinds of names you are allowed to choose, if for example you are naturalizing. The list of allowed names clearly distinguishes you and your family from "true" Japanese.