They are different because the homomorphism conditions are completely different:
For a module homomorphism of $R$ into $R$, $f(r)=f(1)r$
but for a ring homomorphism, $f(r)=f(r)f(1)$.
This is especially uninformative when (as usual) $f(1)$ is the identity of $R$: it's just a tautology.
In the first case, knowing $f(1)$ tells you every $f(r)$, but in the second case, you are still stuck wondering what $f(r)$ is. Being a multiplicative map and being and being $R$ linear are very different.
Perhaps a more enlightening way to think of ring and module homomorphisms is to think about their kernels. The kernels of ring homomorphisms have to be two-sided ideals, but the kernels of module homomorphisms only need to be one-sided.
The complicating factor here for you, it seems, is that the module multiplication and the ring multiplication match for the module $R_R$. Since they have the same multiplication, you might be tempted to think they have "the same structure".
However, this is simply not the case, because morphisms are intimately tied with the structure. If you've never heard of a category before, here is a rough summary. A category consists of a bunch of objects that you are talking about, along with morphisms between them.
So there is a category of groups (whose objects are groups and whose morphisms are group homomrphisms) and there is a category of rings (whose objects are rings and whose morphisms are ring homomorphisms.) There is also a category of $R$ modules (whose objects are right $R$ modules and morphisms are $R$ module homomorphisms.) There is probably no doubt in your mind that the category of rings and $R$ modules are different, but here we are trying to figure out how $R$ can be an object in the category of rings and the category of $R$ modules without "having the same structure".
Since morphisms are important, their kernels become important substructres of each object. In rings, these kernels are ideals, in modules, these kernels are submodules. Now in the case of $R_R$, a right submodule happens to be called a right ideal, because of the resemblance with being "half" the ideal axioms.
It's easy to think of a ring $R$ which has very different ideal and right submodule structures. If you take the matrix ring $M_n(F)$ over a field $F$, then we know that there are only two ideals, and so the only ring homomorphisms starting in $R$ are either the zero homorphism, or they are injective.
But the same can't be said about the module $R_R$, since it has lots of right $R$ submodules. The easiest ones to describe are the matrices which are zero outside of a fixed row. In fact if $F$ is infinite, there are infinitely many distinct right ideals.
So I hope by showing how different substructures can be will help you see why they do not really have "the same structure". Because the morphisms are different, the structures are different.
Best Answer
The claim you have is not true in the notation you gave. If you use left modules, i.e. you write $dm$ and left notation, i.e. you write $f(g(x))$ and not $xgf$. In this case you have $End(D^n)\cong D^{op}$. The answer you get requires you to work with left modules and right notation or with right modules and left notation.