If you are going to be using it in melee as a quarterstaff, depending on what race you pick, wood elf being a great choice, you will be proficient with a longbow anyway.
Flurry can be used even with a longbow normally.
Kensei is a pretty horrible subclass.
However you could always see if your dm will let you consider the bow a club when improvised as a melee weapon, take longbow and improvised longbow as a club or great club as your kensei weapons.