Assuming you're talking about high school rules:
This is considered a correctable error that's been caught within the proper time frame. Wipe out the point from the first free throw. You didn't mention any fouls, but if there were, you would wipe out any fouls except those that were unsportsmanlike, intentional or flagrant. Put the correct player on the to shoot his/her two free throws and resume as normal.