Narrative:

I was flying from ZZZ to ZZZ1. I had never flown to ZZZ1 and was flying with approach. I had been handed off several times along the way before reaching the valley. I was just over the last set of mountains entering the valley when approach called my tail number; but I was unable to understand the transmission. I asked for approach to repeat but did not get an answer. I waited a few minutes and called back; that's when I was told that approach had lost my altitude on radar. I was now well into the valley when I called back and asked if it was a problem with my transponder. Approach stated that I was in a bad area and they couldn't tell my elevation. They said I was very close to ZZZ1 and I could fly VFR the rest of the way and let me go. I switched [frequency]; and could see the airport on my foreflight and off to my left. It shows the runways and I was about 8 miles to the west of runway xx. I called on the radio that I was 8 miles out for runway xx. I could see the airport and called out my intentions every 2 miles. On short final just before touch down; I thought I saw number xy and not an xx. This was one of the first signs that I might not be at ZZZ1. I then noticed large jets and a tower. [We realized] that we had landed in ZZZ2. I pulled off the runway and contacted ground of my mistake. They directed me back to runway xy for takeoff. While holding to take off; I was asked to call the tower on a land line when I got the chance. I asked if I could call right now and I did. I gave my information and was let go to land at ZZZ1. It was just a few miles and we could not see the runway till we were right on top of the runway. I do know where I went wrong by not checking if approach had got me permission to fly though the delta airspace and not realizing that ZZZ2 airport is much larger than ZZZ1 airport. I wish that approach had told me to stay clear of the delta or asked me to contact the tower before entering the airspace. The airports are so close that my foreflight showed it as one runway and not two different airports. So only seeing one airport on my GPS; I didn't give it a second thought of it could be the wrong airport. After I landed at ZZZ1; I called my instructor to let him know what had happen.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported entering Class D airspace and landing without contacting the Tower due to confusion with airport location.

Narrative: I was flying from ZZZ to ZZZ1. I had never flown to ZZZ1 and was flying with Approach. I had been handed off several times along the way before reaching the valley. I was just over the last set of mountains entering the valley when Approach called my tail number; but I was unable to understand the transmission. I asked for Approach to repeat but did not get an answer. I waited a few minutes and called back; that's when I was told that Approach had lost my altitude on radar. I was now well into the valley when I called back and asked if it was a problem with my transponder. Approach stated that I was in a bad area and they couldn't tell my elevation. They said I was very close to ZZZ1 and I could fly VFR the rest of the way and let me go. I switched [frequency]; and could see the airport on my ForeFlight and off to my left. It shows the runways and I was about 8 miles to the west of Runway XX. I called on the radio that I was 8 miles out for Runway XX. I could see the airport and called out my intentions every 2 miles. On short final just before touch down; I thought I saw number XY and not an XX. This was one of the first signs that I might not be at ZZZ1. I then noticed large jets and a Tower. [We realized] that we had landed in ZZZ2. I pulled off the runway and contacted Ground of my mistake. They directed me back to runway XY for takeoff. While holding to take off; I was asked to call the Tower on a land line when I got the chance. I asked if I could call right now and I did. I gave my information and was let go to land at ZZZ1. It was just a few miles and we could not see the runway till we were right on top of the runway. I do know where I went wrong by not checking if Approach had got me permission to fly though the Delta airspace and not realizing that ZZZ2 airport is much larger than ZZZ1 airport. I wish that Approach had told me to stay clear of the Delta or asked me to contact the Tower before entering the airspace. The airports are so close that my ForeFlight showed it as one runway and not two different airports. So only seeing one airport on my GPS; I didn't give it a second thought of it could be the wrong airport. After I landed at ZZZ1; I called my Instructor to let him know what had happen.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.