Thomas and Ann baptised two Johns in Haddenham - the first on 28 May 1766 and the second on 14 Aug 1768. The first one looks to have been the one buried a month later, and I agree that the second looks as though he was the one married in 1790. Which leaves the field clear for John baptised in 1765 to be yours - ages at death are notoriously unreliable, particularly the older the person was, so 77 looks pretty close to a 1765, or perhaps a bit earlier, birth.
David