Play against a computer, but only with a few pieces and without the kings I would like to practise playing chess against an chess engine/program, but only with a few pieces, without the kings. For example, 3 pawns against one knight.

Does exist any chess engine/program like this?
No engine that I’ve ever come across has this functionality. In fact it would actually be surprisingly difficult to get a chess engine to do this;
The most fundamental rule of chess is that you have to checkmate your opponent’s king. A position without kings on the board wouldn’t make sense to something like Stockfish, because the game ends before the king can be captured. If you don’t have kings on the board, you essentially have to rewrite the rules of the game for the engine. This would also have the knock-on effect that, because king safety it widely considered the most important consideration in chess, you would then have to re-programme how the engine analyses the board, as king safety would no longer be a thing. By this point, once you have an engine which has different game rules and a different way of analysing the game, it doesn’t really make sense to say that it’s the same engine, but rather two different engines playing two different games. Long story short; you couldn't give a position without kings to a normal chess engine and expect to get a meaningful analysis back.
If you wanted to get around this, you could set up a position where both kings are in the opposite corner, so that they’re far enough away from the action that they couldn’t get there in time to help (assuming it’s something like 3 pawns vs a knight). Alternatively, you could set up the position on a board and play against yourself, trying to find the best move for both sides.
tl;dr – You would have to build an engine with this specific scenario in mind for it to work.