Yes, provided the correct thimble or through-the-wall fitting is used for either combustible or non-combustible wall material as it may apply. If this is not an outside wall, then the pipe must continue until it can penetrate an outside wall. Any adjoining room it runs through must be the same temperature as the kitchen.