There are zero similarities between Star Wars and Star Trek, aside from them taking place in space and having the word "Star" in their titles. Lucas was inspired by Japanese cinema -- specifically Akira Kurosawa's "The Hidden Fortress" -- not Star Trek.
Lucas cribbed terminology popularized by
Star Trek: "deflector shields," "tractor beam," and "p
hroton torpedo," and "federation" in the prequels, so I don't think it's fair to say that he had literally zero inspiration from
Star Trek.
But
Star Wars was anything but a
Star Trek rip-off. The project began when Lucas could not secure the rights to
Flash Gordon. As you say, he was influenced by Japanese cinema. He was a film student, so he was influenced by a lot of film. The motifs in the story follow from his efforts to deconstruct mythological lore, so the influences are numerous and likely difficult to account for comprehensively.
To
@Captain Atkin's points, science fiction was popular in the 1970s, thanks to
Star Trek, but also thanks to
2001, Planet of the Apes, and others. One of the popular shows on TV at the time was
The Six Million Dollar Man. Spielberg was about to make
Close Encounters and would soon make
E.T. The fact that the popularity of
Star Wars transcended the audiences of all of these things more or less proves that its fan base was not confined to any one of them.
Getting back to PIC, I have no doubt that the Ent-D run into the Borg cube and to its reactor is a direct allusion to and homage of the attack on the
Death Star II in
Return of the Jedi.