Translation:He kept himself far from the lawyer.
Thank you, that's very kind. Actually, I already have so many lingots I really don't know what to do with them all. Can I donate them to a charity, convert them into something more universally recognised, buy you a beer???
As for Duolingo and its limitations - there are astonishingly few. I'm really impressed with the whole package, and it's free! Great work from the very talented and devoted team.
No, that's an idiom and Italian matches it with mantenere le distanze da. Different verb, plural distance.
The real meaning is "He used to keep/stay away from the lawyer". Tenersi lontano da is to keep/stay away from, and does not need 'himself'. Strictly translated, the imperfetto implies continuity, repetition or habit, so without context I'd use 'was keeping', 'would keep' or (I think best here) 'used to keep'; 'kept' is OK if context has established that setting.
As others have pointed out, a problem with a program like this is that Duolingo cannot possibly provide for the array of expressions we might use to translate something - nuances, etc. But take some comfort in knowing you were right. And to make that feel a bit more sincere, here's a lingot to replace the one they took away!
I think you are trying to translate from your own experience and culture rather than translating the italian. Your sentence would be Si e' tenuto ben lontano dall'avvocato. You can see that there would need the word 'ben' to indicate 'well'. And you left out the word 'himself'.
I think an advocate is a kind of specialised or more advanced lawyer - one who speaks on behalf of a client in court - but these are terms which probably have slightly different meanings in different English-speaking countries anyway. I think that it should be accepted though!