In this context, where the period is in the past, there is no significant difference in meaning. All three quoted sentences have the same meaning. The answer by Fumblefingers and the comments by Kate Bunting clarify relative frequency of usage.
But when the period is in the future, the two forms have significantly different meanings.
- (1) The rental will be available in three months.
- (2) The rental will be available for three months.
Sentence (1) means that the rental will be available starting three months in the future. But (2) means that the rental will only be available for a period of three months, probably starting right away, unless a further statement clarifies this. In this context the different prepositions carry different meanings.
In the context of the duration of an event, only some forms are acceptable.
- (3) He was able to get the job done in two weeks.
- (4) He was able to get the job done for two weeks.
Here sentence (3) mans that the job was accomplished within a time span of two weeks. But (4) has a very different meaning (which I missed, thanks to John Bollinger for pointing it out). It means that he was able to perform the job for a period of two weeks, but not after that.
So the difference, if an, between "in {period of time}" and "for {period of time}" depends on the semantic context, that is, on the meaning of the text of which it is a part.