1) Original sentence is incorrect, should be either "He has BEEN learning Ukrainian for two years." or "He learned Ukrainian for two years."
2) Він вчив/вивчав українську протягом двох років should also be accepted
Why "він учив" is not correct?