you are using it in a template not a route. the route would set the header to json when returning an array. i suggest you setup the route. if you must stick to the template you need to use kirbys header functions to change the mime to json. but i do not know by heart how to do so. maybe @texnixe can help you with that.
Instead of sending a header, you can use a content representation. Rename your template to feed.rss.php, your feed will then be accessible at your domain/feed.rss.