That's simply about owning property. Actually living in Japan full time is a whole other issue.
Buying a house in Japan is not really different to buying a house anywhere else, but that doesn't mean you can live there permanently.
We have a small holiday home in Mallorca but we can only stay there for 90 days out of every 180 without a visa. It's the same thing with Japan, you can only stay there for up to 90 days without a visa.
"...I read there are many empty houses."
These are mostly in rural areas. The population of Japan has been falling for the last 15 years as the birth rate has dropped. Japan's population peaked in around 2010 and has been falling since then.
Many firms, especially in the service sector and construction, just can't find enough workers.
In addition, many younger people prefer to live in cities rather than rural areas. You see the same sort of thing happening in rural parts of Italy and Spain.
"Do you know why it isn't a popular place for immigrants who feel displaced in their country of birth to move to?"
Most of the countries that are the source of refugees are a lot closer to Europe than to Japan and also people are more likely to speak English or other european languages.
But also, because they reject most asylum seekers that apply.
Last year the UK had 67,337 asylum applications relating to 84,425 people. Japan had 13,823 applications of whom they accepted just 303.
A further 1,005 were granted permission to reside in Japan on humanitarian grounds despite not qualifying for refugee status.