I am trying to write a Velocity Template in Intellij Ultimate, which includes plugins for Velocity. However I already run into issues on this simple example:
package ${PACKAGE_NAME}
I don't understand why I am getting an error here. My final goal is to write a file template for Android Studio in Intellij Ultimate, as it includes plugins for Velocity. I want to copy over the finished template to Android Studio.

these files are not intended to be edited in a plain Java/Velocity project, you should edit them in the "File and Code Templates" Window.
Before we begin editing, let's learn how to access the Templates window. There, we can find all existing templates and also create our own.
Steps:
You should be presented with a window that looks like this.

For more info, please refer to these pages: https://dev.to/wilderminds/how-to-use-android-studio-file-templates-to-speed-up-development-4e93
https://developer.android.com/studio/write/create-java-class#templates