No, it does not have to be a knight.
It is really any forward square (5th rank or 6th rank), occupied by any piece (knight, bishop, rook, and more rarely since it can be chased away by less-valuable pieces, but even a queen sometimes). The piece usually applies uncomfortable influence over the opponent’s position.
For example, I have seen rooks planted often on d6, protected by a pawn (on e5 or c5, or even both). The rook exerts great pressure, but if taken, a strong passed pawn appears instead...trading one advantage for another.
It also really does not even have to be protected by a pawn, as long as it is, or can be, defended enough that you can continue to control it. A knight on e5 protected by a Re1 is a common example here.
P.S. GM Dofrman in the book, “The Method in Chess” has his own definition of an outpost: “an outpost is a square on a half-open file in front of an enemy pawn, situated on the 6th (for White - on the 3rd) rank.”
When I watched the videos on chess.24.com, even GM Jan Gustafsson seemed to be a little taken aback by his definition, thinking it should be more broad.
Personally, I think that his definition is a bit limiting.