If you don’t use the old computer anymore, then yes - just install avast! on the new one and enter the (old) key.
If you are using both the computers now, you should have 2 licenses for avast!.. i.e. you should get a new key.