You can unlock iphone 4 for free but it depends on your baseband version . You can unlock with Ultrasn0w Fixer .
If your baseband isnt compatible then the cheapest unlock is gevey sim . If you want a permanent unlock then thats much more expensive .
You can check your baseband from Settings > About > Modem Firmware
Can I unlock it without being there in Japan ?
Yes you can unlock it from anywhere