The ending was supposed to be a bit of a twist but the film did not establish it too much. Earlier in the film, Charlie established that he had a recently deceased cousin who looked very similar to him. Jordan also alluded to many similarities between Charlie and her fiance in the letter. It turns out that Jordan's dead fiance was in fact Charlie's cousin and her fiance's mother/Charlie aunt (whom she had gotten very close to) was trying to set up Jordan and Charlie for a year.
The film does not clearly establish it at the end leaving the viewer to figure it out themselves a few minutes later