The question isn’t whether there exists a function that can translate one language to another. If they’re Turing complete, it’s certainly the case that the same software CAN be written in different languages. The question is whether or not it would produce idiomatic code in the target language and whether or not you/the developer would recognize it as (not) idiomatic when it did.
You can’t tell me that precisely the same paradigms, mechanics, patterns and practices will be used to develop software in both Java/Spring and Ruby/Rails, for example. The way you need to (be able to) think about how you write the software using those two languages will be non-trivially different.