WordPress multilingual website domain and folders

Providing you’ve already updated the internal links and that example.jp points to the same place on the filesystem as example.com (via CNAME and appropriate server config changes) then you don’t necessarily need to rewrite to example.com, since example.jp accesses the same files. Trying to rewrite to a different domain will implicitly trigger an external redirect anyway (regardless of whether you specify the R flag on the RewriteRule directive).

So, to change this to a rewrite on the example.jp domain:

RewriteCond %{HTTP_HOST} ^(www\.)?example\.jp
RewriteRule (.*) /ja/$1 [L]

(Why are you using ja in the substitution string – is that a typo? Shouldn’t it be jp as mentioned earlier in your question?)

However, this may trigger a rewrite-loop, depending on whether you have other directives. So, you would probably need to add a condition to prevent this. For example:

RewriteCond %{REQUEST_URI} !^/ja/
RewriteCond %{HTTP_HOST} ^(www\.)?example\.jp
RewriteRule (.*) /ja/$1 [L]

The additional RewriteCond directive ensures that the requested URL does not (! prefix) already start with /ja/.

Although it would be more efficient to avoid rewriting /ja/ URLs with a check in the RewriteRule pattern instead. For example:

RewriteCond %{HTTP_HOST} ^(www\.)?example\.jp
RewriteRule !^ja/ /ja%{REQUEST_URI} [L]

Now, the RewriteRule is only processed when the URL does not start /ja/, instead of processed every request (ie. .*).

However, WordPress may still try to canonicalise the hostname? ie. WordPress itself might issue an external redirect to example.com. If this is the case then you will need to override this in WordPress or implement a reverse proxy using mod_proxy – for which you will ideally have access to the server config.