The main question here is: Are you copying the code, or are you copying the underlying algorithm.
Porting code to a different (programming) language is a gray area in copyright law and it will depend for a large part on how mechanical the transformation is whether your version will be seen as a derived work of the original or as a separate work.
On the other hand, algorithms are not subject to copyright, only the way they are expressed. This means that if you only look at the original code to determine how it works and you try to recreate that same behavior, you are one step further away from having created a derived work. The biggest problem might be in proving that the similarities between the two versions are not the result of you having seen the original.
The above does not only apply to copyleft licenses, but it applies to any copyright license that requires a derived work to be released under the same license. For all those licenses, the safest option when porting a work is to release your port under the same license or to get agreement from the maintainers of the original to use a different license for your port.