If you view JDA's documentation on Channel object, you will find a ChannelType enum property that determines the type of the channel, which could be of type Thread or Forum (which ever you're trying to catch), so by using the onChannelCreate EventListener, you should be able to check the channel created against ChannelType.