The word homogamy is somehow related to the isolation or inbreeding while the word endogamy is related to the custom of marrying someone within the limitations of the local government. The word polygamy is related to marrying two or more than females while the word exogamy is marrying outside the community.
The answer to this question is Exogamy, John married the girl outside its community or tribe.