When he left the navy, he found it hard to adjust to life ashore.
The Indonesian sentence was translated from the Japanese one, and indirectly linked to the English one. As a result, “Begitu mencoba menanggalkan…” doesn’t match the English “when he left…” “Mencoba” should be removed.
FYI: “begitu” means not only “like that” (common usage), but also “immediately after” or “when” (colloquial usage). The Indonesian sentence, therefore, means “Soon after trying to leave the Navy, he found it hard to adjust to life ashore”. The Indonesian one doesn’t mean that he actually left. It’s more likely to be interpreted as “he had a second thought and eventually held back from leaving the Navy”.