The answer depends on the type of petition, but the question usually comes up when someone is considering submitting a petition for the degrees. Keep in mind that in Minnesota every lodge has concurrent jurisdiction with every other lodge throughout the state, so a man can petition any lodge under the jurisdiction of the Grand Lodge of Minnesota as long as he meets the requirements. Here is what the Minnesota Masonic Code says on the residency question:
SECTION C9.10 No Lodge shall initiate any person except upon his personal and voluntary petition, nor shall such petition be received unless the petitioner has therein fully answered all questions required to be contained in such petition by the laws of the Grand Lodge; nor unless such petitioner shall have been an actual resident in the jurisdiction of the Lodge for ninety (90) days immediately preceding the date of his petition. Petitions are part of the records and must not be destroyed after they have been acted upon.
And it goes on to state in G14.02 ... A petitioner for affiliation or plural membership need not be a resident of the State of Minnesota. So the residency question really only pertains if it is a petition for the degrees.