Don’t worry, if you have progressed in the story without defeating him and he is no longer in the Outskirts wall Stairway you can still buy the Gourd Seed, it can be found in the offering box next to Hanbei and be bought for 2400 sen.