As mentioned in the comments, the "replacement" of [ŋ] with [n] is mostly restricted to word-final unstressed -ing.
As far as I know, it's not really clear why this happens. (I wrote a more detailed post to this effect as an answer to the question Why does “-ing” go to “-in” in some dialects?)
Almost all of the words where this sound change occurs end in the common suffix -ing, but it can also affect some words that don't end in this suffix, such as something and nothing.
Incidentally, the vowel in -ing/-in' is not necessarily realized as [ɪ].
For speakers with the weak vowel merger (including me), unstressed /ɪn/ may not be clearly distinguished in perception from unstressed /ən/.
Some American English speakers use /iŋ/ in place of /ɪŋ/ (in all contexts), and at least some of these speakers consequently have /in/ (with a different vowel from /ɪn/) as a variant pronunciation of the -ing suffix.