Soliton solutions to the B-type Kadomtsev–Petviashvili equation under general dispersion relations