In OP's examples, then means next, [immediately] after [whatever time/event was previously mentioned].
The concept of transitional tags seems useful here. Depending on your point of view, you could say then conveys either addition or time sequence - but I'll go for the latter, since that's obviously the category for related alternatives such as first, next, finally.
My initial inclination was to say then can happily go before or after the subject (I in OP's example), and leave it at that. But it's worth pointing out that although this is true, and applies equally to first and next, it doesn't apply to finally in quite the same way...
1a: First I did this. 1b: Then/next I did that. 1c: Finally I did something else.
2a: I first did this. 2b: I then/next did that. 2c: ?I finally did something else.
There are some contexts where (2c) above is acceptable, but it doesn't really work in contexts where the only sense of finally is "next and last". If finally comes after the subject, there's invariably a strong implication of "next, and at long last".
I think what this suggests is that all these "transitional tags" should normally come first in the statement, but by custom and practice native speakers don't mind moving small short words to between the subject and verb. But because that's slightly "unusual" positioning, we tend to look for a possible semantic difference.
In practice there doesn't seem to be any credible semantic difference depending on whether we place then before or between subject/verb, so it's just a stylistic choice. But there certainly can be a subtle difference according to the position of then...
3: "You lost £1000 at the roulette table? I hope you then stopped gambling!"
4: "You lost £1000 at the roulette table? I hope you stopped gambling then!"
In (3), then has the normal sense (chronologically after), but in (4) it has the more "extended" sense of as a result [of what came before], in that case, therefore.
To summarise: there's no grammatic or semantic difference in OP's specific examples, but if you're looking for general principles, you'll be safer if you put any transitional tag first in a statement.
Finally, here's an NGram showing how usage has shifted over the past couple of centuries.