Can ire be used in this way? "Iosaphatum salutem ite." (I go to Iosephat for shelter.) Furthermore, is the two accusatives correct? This sentence is based on a Sanskrit construction, and I do not know if Latin can do this in the way that Sanskrit can.
I would not use a single plain accusative with ire in cases like this. As per Ben Kovitz's comment, I will refer to the person as Jehosaphat in English.
The verb ire is mostly used intransitively. As in English, a preposition is needed: ad Iosaphatum ire is "to go to Jehosaphat". Alterinatively, the compound verb adire can be used transitively, so Iosaphatum adire means (almost) the same thing. The simplest way to say "I go to Jehosaphat" is ad Iosaphatum eo.
I would translate "for shelter" as salutis causa (genitive and ablative, "for the reason of safety") if you want to use salus. Salus refers to the state of safety, not to a place. If you want "shelter" to be a physical safe place, then I would use something like confugium, tectum, or tutum. For a religious tone, also ara is also possible. Any of these words needs to be in genitive: congugii, tecti, tuti.
Thus, I would translate you phrase as ad Iosaphatum salutis causa eo.
You could also do other things for a different tone. For example, ad Iosaphatum fuga eo, "I go to Jehosaphat as a refugee".
"I go" is eō. Īte is the plural imperative: "Go, y'all!"
Some Latin verbs take two accusatives, like dīcō, "I tell [person] [what I say]", or rogō, "I request [person] [what I want]." However, I don't think that works with īre because it doesn't naturally have two things that could serve as its object. Consequently, in this sentence:
Iosaphatum salutem eo.
salūtem will be understood as an appositive: "I go to Buddha the salvation" or "I go to Buddha as salvation." This might be exactly what you're looking for even though grammatically it doesn't parallel the use of two accusatives with Sanskrit "gacchāmi", which seems to work like Latin rogō.
Going beyond your question about īre, there may be better ways to word a Latin translation of "Buddhaṃ śaraṇaṃ gacchāmi": different word choices that might echo the Latin tradition more poetically or more clearly. For example, salūs might be perfect, due to its use in Christianity for "salvation", but a more literal translation of śaraṇaṃ, like perfugium, might convey the meaning better. In particular, there may be a better-fitting verb, maybe something like dēcurrō. Wiktionary reports that gacchāmi is cognate with Latin veniō, which might offer some possibilities for a translation that retains the terseness and character of the original.