Study your masters in computer science at a Japanese university is what you want?
Afaik there's no university that teaches that course in English (maybe waseda or sohpia?).
Since your Japanese level is only around N4, you need to have at least N2 (preferable N1) to study at a Japanese university to get the contents. Not sure, but it seems more than obvious imo.
To reach this level from N4 it takes about 1,5 - 2 years while studying at a Japanese Language school.
Again, I don't know for sure, just saying as I've been studying for 2 years now (self-study outside japan) for N2 while I've lived in Japan for 1 year previously.
For the finance, it takes quiet a lot, if not more to study in Japan. Japanese universities are expensive (from a european point of view, I've heard they're cheaper than american universities though).
Same with renting an apartment in Japan in Tokyo, depending where you want to study.
I'd stuggest looking up what you want to study (for your masters), where it's offered, what those requirements are from the university, and then calculate what it will all cost (university and appartment costs alone). After that, you can do the same for a language school.