The first two sentences are definetly right and clear, and certainly the most approriate way of telling this.
(The two last, on the other hand are incorrect and would sound weird to a french speaker)
If you want to include yourselft as "Me" in the sentence - like you said in your comment -, this is how I'd express it :
Or, if you want to highlight the fact that you just/finally achieved it :
- Il m'a fallu deux ans, mais j'ai finalement pu y habituer mon corps.
- Cela m'a pris deux ans, mais j'ai finalement pu y habituer mon corps.
Even more insisting on the achievement :
- Il m'aura fallu deux ans, mais j'ai finalement pu y habituer mon corps.
- Cela m'aura pris deux ans, mais j'ai finalement pu y habituer mon corps.
Attention
If you want to precise what your body got used to, the sentence would be :
- Il m'a fallu deux ans pour
y habituer mon corps à cet effort quotidien.
Which somehow sounds even better than the version with y.