A superficial similarity does not an inspiration make.
I'm a Tolkien purist through and through. Babylon 5 shows huge
influence from Tolkien's legendarium and is undoubtedly its biggest influence. JMS' online comments consistently reference LOTR as a comparison and influence. Nagisa is right in that having the elder races leave the younger ones for the Grey Havens is a huge riff but there are countless others that are vital to the DNA of the show.
Some are obvious like the Rangers and Sinclair's Za'ha'dum fall and resurrection. Others are to do with the general structure of the novel-like story. And Sheridan/Delenn's romance is a clear homage to Beren and Luthien (My favourite chapter of Tolkien's!).
I agree with most of this, but the Beren/Luthien thing is a bit of a stretch. The star crossed lovers from different backgrounds goes back a bit farther than Tolkein.
Other than them being different races, there isn't too much similarity.